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

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

Issue 10699057: Move application creation and extension install prompt showing off Browser and onto ExtensionTabHel… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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_disabled_ui.h" 5 #include "chrome/browser/extensions/extension_disabled_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 const Extension* extension_; 91 const Extension* extension_;
92 }; 92 };
93 93
94 ExtensionDisabledDialogDelegate::ExtensionDisabledDialogDelegate( 94 ExtensionDisabledDialogDelegate::ExtensionDisabledDialogDelegate(
95 Browser* browser, 95 Browser* browser,
96 ExtensionService* service, 96 ExtensionService* service,
97 const Extension* extension) 97 const Extension* extension)
98 : service_(service), extension_(extension) { 98 : service_(service), extension_(extension) {
99 AddRef(); // Balanced in Proceed or Abort. 99 AddRef(); // Balanced in Proceed or Abort.
100 100
101 install_ui_.reset(new ExtensionInstallPrompt(browser)); 101 install_ui_.reset(chrome::CreateExtensionInstallPromptWithBrowser(browser));
102 install_ui_->ConfirmReEnable(this, extension_); 102 install_ui_->ConfirmReEnable(this, extension_);
103 } 103 }
104 104
105 ExtensionDisabledDialogDelegate::~ExtensionDisabledDialogDelegate() { 105 ExtensionDisabledDialogDelegate::~ExtensionDisabledDialogDelegate() {
106 } 106 }
107 107
108 void ExtensionDisabledDialogDelegate::InstallUIProceed() { 108 void ExtensionDisabledDialogDelegate::InstallUIProceed() {
109 service_->GrantPermissionsAndEnableExtension( 109 service_->GrantPermissionsAndEnableExtension(
110 extension_, install_ui_->record_oauth2_grant()); 110 extension_, install_ui_->record_oauth2_grant());
111 Release(); 111 Release();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 AddGlobalError(new ExtensionDisabledGlobalError(service, extension)); 318 AddGlobalError(new ExtensionDisabledGlobalError(service, extension));
319 } 319 }
320 320
321 void ShowExtensionDisabledDialog(ExtensionService* service, Browser* browser, 321 void ShowExtensionDisabledDialog(ExtensionService* service, Browser* browser,
322 const Extension* extension) { 322 const Extension* extension) {
323 // This object manages its own lifetime. 323 // This object manages its own lifetime.
324 new ExtensionDisabledDialogDelegate(browser, service, extension); 324 new ExtensionDisabledDialogDelegate(browser, service, extension);
325 } 325 }
326 326
327 } // namespace extensions 327 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_install_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698