Commit c8ff7c9e authored by yoz@chromium.org's avatar yoz@chromium.org

Streamlined sideload UI for extensions from the webstore.

http://i.imgur.com/OOjPmDJ.png

Sideloaded extensions that have a webstore update URL have a global error bubble replacing the normal extension install dialog.

Still TODO:
- Making this not appear for new profiles.
- Unit tests.

BUG=229083

Review URL: https://chromiumcodereview.appspot.com/14328029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195391 0039d316-1c4b-4281-b951-d872f2087c98
parent 8190aed1
...@@ -520,12 +520,15 @@ void ExtensionInstallPrompt::ConfirmReEnable(Delegate* delegate, ...@@ -520,12 +520,15 @@ void ExtensionInstallPrompt::ConfirmReEnable(Delegate* delegate,
} }
void ExtensionInstallPrompt::ConfirmExternalInstall( void ExtensionInstallPrompt::ConfirmExternalInstall(
Delegate* delegate, const Extension* extension) { Delegate* delegate,
const Extension* extension,
const ShowDialogCallback& show_dialog_callback) {
DCHECK(ui_loop_ == MessageLoop::current()); DCHECK(ui_loop_ == MessageLoop::current());
extension_ = extension; extension_ = extension;
permissions_ = extension->GetActivePermissions(); permissions_ = extension->GetActivePermissions();
delegate_ = delegate; delegate_ = delegate;
prompt_.set_type(EXTERNAL_INSTALL_PROMPT); prompt_.set_type(EXTERNAL_INSTALL_PROMPT);
show_dialog_callback_ = show_dialog_callback;
LoadImageIfNeeded(); LoadImageIfNeeded();
} }
......
...@@ -268,8 +268,10 @@ class ExtensionInstallPrompt ...@@ -268,8 +268,10 @@ class ExtensionInstallPrompt
// extension should be enabled (external extensions are installed disabled). // extension should be enabled (external extensions are installed disabled).
// //
// We *MUST* eventually call either Proceed() or Abort() on |delegate|. // We *MUST* eventually call either Proceed() or Abort() on |delegate|.
virtual void ConfirmExternalInstall(Delegate* delegate, virtual void ConfirmExternalInstall(
const extensions::Extension* extension); Delegate* delegate,
const extensions::Extension* extension,
const ShowDialogCallback& show_dialog_callback);
// This is called by the extension permissions API to verify whether an // This is called by the extension permissions API to verify whether an
// extension may be granted additional permissions. // extension may be granted additional permissions.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment