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

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.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/ui/webui/ntp/app_launcher_handler.h" 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 extension_uninstall_dialog_.reset( 982 extension_uninstall_dialog_.reset(
983 ExtensionUninstallDialog::Create(browser, this)); 983 ExtensionUninstallDialog::Create(browser, this));
984 } 984 }
985 return extension_uninstall_dialog_.get(); 985 return extension_uninstall_dialog_.get();
986 } 986 }
987 987
988 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() { 988 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() {
989 if (!extension_install_ui_.get()) { 989 if (!extension_install_ui_.get()) {
990 Browser* browser = browser::FindBrowserWithWebContents( 990 Browser* browser = browser::FindBrowserWithWebContents(
991 web_ui()->GetWebContents()); 991 web_ui()->GetWebContents());
992 extension_install_ui_.reset(new ExtensionInstallPrompt(browser)); 992 extension_install_ui_.reset(
993 chrome::CreateExtensionInstallPromptWithBrowser(browser));
993 } 994 }
994 return extension_install_ui_.get(); 995 return extension_install_ui_.get();
995 } 996 }
996 997
997 void AppLauncherHandler::UninstallDefaultApps() { 998 void AppLauncherHandler::UninstallDefaultApps() {
998 AppsPromo* apps_promo = extension_service_->apps_promo(); 999 AppsPromo* apps_promo = extension_service_->apps_promo();
999 const extensions::ExtensionIdSet& app_ids = apps_promo->old_default_apps(); 1000 const extensions::ExtensionIdSet& app_ids = apps_promo->old_default_apps();
1000 for (extensions::ExtensionIdSet::const_iterator iter = app_ids.begin(); 1001 for (extensions::ExtensionIdSet::const_iterator iter = app_ids.begin();
1001 iter != app_ids.end(); ++iter) { 1002 iter != app_ids.end(); ++iter) {
1002 if (extension_service_->GetExtensionById(*iter, true)) 1003 if (extension_service_->GetExtensionById(*iter, true))
1003 extension_service_->UninstallExtension(*iter, false, NULL); 1004 extension_service_->UninstallExtension(*iter, false, NULL);
1004 } 1005 }
1005 } 1006 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/install_extension_handler.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698