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

Side by Side Diff: chrome/browser/extensions/bundle_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/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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 InstallUIProceed(); 265 InstallUIProceed();
266 } else if (g_auto_approve_for_test == ABORT) { 266 } else if (g_auto_approve_for_test == ABORT) {
267 InstallUIAbort(true); 267 InstallUIAbort(true);
268 } else { 268 } else {
269 Browser* browser = browser_; 269 Browser* browser = browser_;
270 if (!browser) { 270 if (!browser) {
271 // The browser that we got initially could have gone away during our 271 // The browser that we got initially could have gone away during our
272 // thread hopping. 272 // thread hopping.
273 browser = browser::FindLastActiveWithProfile(profile_); 273 browser = browser::FindLastActiveWithProfile(profile_);
274 } 274 }
275 install_ui_.reset(new ExtensionInstallPrompt(browser)); 275 install_ui_.reset(chrome::CreateExtensionInstallPromptWithBrowser(browser));
276 install_ui_->ConfirmBundleInstall(this, permissions); 276 install_ui_->ConfirmBundleInstall(this, permissions);
277 } 277 }
278 } 278 }
279 279
280 void BundleInstaller::ShowInstalledBubbleIfDone() { 280 void BundleInstaller::ShowInstalledBubbleIfDone() {
281 // We're ready to show the installed bubble when no items are pending. 281 // We're ready to show the installed bubble when no items are pending.
282 if (!GetItemsWithState(Item::STATE_PENDING).empty()) 282 if (!GetItemsWithState(Item::STATE_PENDING).empty())
283 return; 283 return;
284 284
285 if (browser_) 285 if (browser_)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 void BundleInstaller::OnBrowserAdded(Browser* browser) {} 340 void BundleInstaller::OnBrowserAdded(Browser* browser) {}
341 341
342 void BundleInstaller::OnBrowserRemoved(Browser* browser) { 342 void BundleInstaller::OnBrowserRemoved(Browser* browser) {
343 if (browser_ == browser) 343 if (browser_ == browser)
344 browser_ = NULL; 344 browser_ = NULL;
345 } 345 }
346 346
347 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} 347 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {}
348 348
349 } // namespace extensions 349 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698