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

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

Issue 10388252: Refactoring ExtenionInstallUI to abstract the Browser references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced + mac fix Created 8 years, 6 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
« no previous file with comments | « chrome/browser/extensions/bundle_installer.h ('k') | chrome/browser/extensions/crx_installer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bundle_installer.h" 5 #include "chrome/browser/extensions/bundle_installer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 for (size_t i = 0; i < dummy_extensions_.size(); ++i) { 260 for (size_t i = 0; i < dummy_extensions_.size(); ++i) {
261 permissions = ExtensionPermissionSet::CreateUnion( 261 permissions = ExtensionPermissionSet::CreateUnion(
262 permissions, dummy_extensions_[i]->required_permission_set()); 262 permissions, dummy_extensions_[i]->required_permission_set());
263 } 263 }
264 264
265 if (g_auto_approve_for_test == PROCEED) { 265 if (g_auto_approve_for_test == PROCEED) {
266 InstallUIProceed(); 266 InstallUIProceed();
267 } else if (g_auto_approve_for_test == ABORT) { 267 } else if (g_auto_approve_for_test == ABORT) {
268 InstallUIAbort(true); 268 InstallUIAbort(true);
269 } else { 269 } else {
270 install_ui_.reset(new ExtensionInstallUI(profile_)); 270 install_ui_.reset(new ExtensionInstallPrompt(profile_));
271 install_ui_->ConfirmBundleInstall(this, permissions); 271 install_ui_->ConfirmBundleInstall(this, permissions);
272 } 272 }
273 } 273 }
274 274
275 void BundleInstaller::ShowInstalledBubbleIfDone() { 275 void BundleInstaller::ShowInstalledBubbleIfDone() {
276 // We're ready to show the installed bubble when no items are pending. 276 // We're ready to show the installed bubble when no items are pending.
277 if (!GetItemsWithState(Item::STATE_PENDING).empty()) 277 if (!GetItemsWithState(Item::STATE_PENDING).empty())
278 return; 278 return;
279 279
280 if (browser_) 280 if (browser_)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 void BundleInstaller::OnBrowserAdded(Browser* browser) {} 335 void BundleInstaller::OnBrowserAdded(Browser* browser) {}
336 336
337 void BundleInstaller::OnBrowserRemoved(Browser* browser) { 337 void BundleInstaller::OnBrowserRemoved(Browser* browser) {
338 if (browser_ == browser) 338 if (browser_ == browser)
339 browser_ = NULL; 339 browser_ = NULL;
340 } 340 }
341 341
342 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} 342 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {}
343 343
344 } // namespace extensions 344 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/bundle_installer.h ('k') | chrome/browser/extensions/crx_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698