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

Side by Side Diff: chrome/browser/extensions/unpacked_installer.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/unpacked_installer.h" 5 #include "chrome/browser/extensions/unpacked_installer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "chrome/browser/extensions/extension_install_prompt.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 scoped_refptr<const Extension> extension_; 44 scoped_refptr<const Extension> extension_;
45 }; 45 };
46 46
47 SimpleExtensionLoadPrompt::SimpleExtensionLoadPrompt( 47 SimpleExtensionLoadPrompt::SimpleExtensionLoadPrompt(
48 Profile* profile, 48 Profile* profile,
49 base::WeakPtr<ExtensionService> extension_service, 49 base::WeakPtr<ExtensionService> extension_service,
50 const Extension* extension) 50 const Extension* extension)
51 : service_weak_(extension_service), 51 : service_weak_(extension_service),
52 extension_(extension) { 52 extension_(extension) {
53 Browser* browser = browser::FindLastActiveWithProfile(profile); 53 Browser* browser = browser::FindLastActiveWithProfile(profile);
54 install_ui_.reset(new ExtensionInstallPrompt(browser)); 54 install_ui_.reset(chrome::CreateExtensionInstallPromptWithBrowser(browser));
55 } 55 }
56 56
57 SimpleExtensionLoadPrompt::~SimpleExtensionLoadPrompt() { 57 SimpleExtensionLoadPrompt::~SimpleExtensionLoadPrompt() {
58 } 58 }
59 59
60 void SimpleExtensionLoadPrompt::ShowPrompt() { 60 void SimpleExtensionLoadPrompt::ShowPrompt() {
61 install_ui_->ConfirmInstall(this, extension_); 61 install_ui_->ConfirmInstall(this, extension_);
62 } 62 }
63 63
64 void SimpleExtensionLoadPrompt::InstallUIProceed() { 64 void SimpleExtensionLoadPrompt::InstallUIProceed() {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 237 }
238 238
239 PermissionsUpdater perms_updater(service_weak_->profile()); 239 PermissionsUpdater perms_updater(service_weak_->profile());
240 perms_updater.GrantActivePermissions(extension, false); 240 perms_updater.GrantActivePermissions(extension, false);
241 service_weak_->OnExtensionInstalled(extension, 241 service_weak_->OnExtensionInstalled(extension,
242 false, // Not from web store. 242 false, // Not from web store.
243 StringOrdinal()); 243 StringOrdinal());
244 } 244 }
245 245
246 } // namespace extensions 246 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tab_helper_delegate.cc ('k') | chrome/browser/extensions/webstore_inline_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698