Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: chrome/browser/extensions/extension_install_prompt.cc

Issue 14328029: Streamlined sideload UI for extensions from the webstore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2 classes Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_install_prompt.h" 5 #include "chrome/browser/extensions/extension_install_prompt.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 DCHECK(ui_loop_ == MessageLoop::current()); 513 DCHECK(ui_loop_ == MessageLoop::current());
514 extension_ = extension; 514 extension_ = extension;
515 permissions_ = extension->GetActivePermissions(); 515 permissions_ = extension->GetActivePermissions();
516 delegate_ = delegate; 516 delegate_ = delegate;
517 prompt_.set_type(RE_ENABLE_PROMPT); 517 prompt_.set_type(RE_ENABLE_PROMPT);
518 518
519 LoadImageIfNeeded(); 519 LoadImageIfNeeded();
520 } 520 }
521 521
522 void ExtensionInstallPrompt::ConfirmExternalInstall( 522 void ExtensionInstallPrompt::ConfirmExternalInstall(
523 Delegate* delegate, const Extension* extension) { 523 Delegate* delegate,
524 const Extension* extension,
525 const ShowDialogCallback& show_dialog_callback) {
524 DCHECK(ui_loop_ == MessageLoop::current()); 526 DCHECK(ui_loop_ == MessageLoop::current());
525 extension_ = extension; 527 extension_ = extension;
526 permissions_ = extension->GetActivePermissions(); 528 permissions_ = extension->GetActivePermissions();
527 delegate_ = delegate; 529 delegate_ = delegate;
528 prompt_.set_type(EXTERNAL_INSTALL_PROMPT); 530 prompt_.set_type(EXTERNAL_INSTALL_PROMPT);
531 show_dialog_callback_ = show_dialog_callback;
529 532
530 LoadImageIfNeeded(); 533 LoadImageIfNeeded();
531 } 534 }
532 535
533 void ExtensionInstallPrompt::ConfirmPermissions( 536 void ExtensionInstallPrompt::ConfirmPermissions(
534 Delegate* delegate, 537 Delegate* delegate,
535 const Extension* extension, 538 const Extension* extension,
536 const PermissionSet* permissions) { 539 const PermissionSet* permissions) {
537 DCHECK(ui_loop_ == MessageLoop::current()); 540 DCHECK(ui_loop_ == MessageLoop::current());
538 extension_ = extension; 541 extension_ = extension;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 } 701 }
699 702
700 if (AutoConfirmPrompt(delegate_)) 703 if (AutoConfirmPrompt(delegate_))
701 return; 704 return;
702 705
703 if (show_dialog_callback_.is_null()) 706 if (show_dialog_callback_.is_null())
704 GetDefaultShowDialogCallback().Run(show_params_, delegate_, prompt_); 707 GetDefaultShowDialogCallback().Run(show_params_, delegate_, prompt_);
705 else 708 else
706 show_dialog_callback_.Run(show_params_, delegate_, prompt_); 709 show_dialog_callback_.Run(show_params_, delegate_, prompt_);
707 } 710 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt.h ('k') | chrome/browser/extensions/external_install_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698