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

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

Issue 12090062: Enable profile switching for standalone App Launcher via the Settings App. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable tests on aura Created 7 years, 10 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('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/extension_install_ui_default.h" 5 #include "chrome/browser/extensions/extension_install_ui_default.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" 10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 new ErrorInfobarDelegate(infobar_service, browser, error))); 103 new ErrorInfobarDelegate(infobar_service, browser, error)));
104 } 104 }
105 105
106 void OnAppLauncherEnabledCompleted(const extensions::Extension* extension, 106 void OnAppLauncherEnabledCompleted(const extensions::Extension* extension,
107 Browser* browser, 107 Browser* browser,
108 SkBitmap* icon, 108 SkBitmap* icon,
109 bool use_bubble, 109 bool use_bubble,
110 bool use_launcher) { 110 bool use_launcher) {
111 #if defined(ENABLE_APP_LIST) 111 #if defined(ENABLE_APP_LIST)
112 if (use_launcher) { 112 if (use_launcher) {
113 chrome::ShowAppList(); 113 chrome::ShowAppList(browser->profile());
114 114
115 content::NotificationService::current()->Notify( 115 content::NotificationService::current()->Notify(
116 chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST, 116 chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST,
117 content::Source<Profile>(browser->profile()), 117 content::Source<Profile>(browser->profile()),
118 content::Details<const std::string>(&extension->id())); 118 content::Details<const std::string>(&extension->id()));
119 return; 119 return;
120 } 120 }
121 #endif 121 #endif
122 122
123 if (use_bubble) { 123 if (use_bubble) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 // static 224 // static
225 ExtensionInstallUI* ExtensionInstallUI::Create(Profile* profile) { 225 ExtensionInstallUI* ExtensionInstallUI::Create(Profile* profile) {
226 return new ExtensionInstallUIDefault(profile); 226 return new ExtensionInstallUIDefault(profile);
227 } 227 }
228 228
229 // static 229 // static
230 void ExtensionInstallUI::OpenAppInstalledUI(Browser* browser, 230 void ExtensionInstallUI::OpenAppInstalledUI(Browser* browser,
231 const std::string& app_id) { 231 const std::string& app_id) {
232 #if defined(OS_CHROMEOS) 232 #if defined(OS_CHROMEOS)
233 chrome::ShowAppList(); 233 chrome::ShowAppList(browser->profile());
234 234
235 content::NotificationService::current()->Notify( 235 content::NotificationService::current()->Notify(
236 chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST, 236 chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST,
237 content::Source<Profile>(browser->profile()), 237 content::Source<Profile>(browser->profile()),
238 content::Details<const std::string>(&app_id)); 238 content::Details<const std::string>(&app_id));
239 #else 239 #else
240 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( 240 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams(
241 browser, GURL(chrome::kChromeUINewTabURL))); 241 browser, GURL(chrome::kChromeUINewTabURL)));
242 chrome::Navigate(&params); 242 chrome::Navigate(&params);
243 243
(...skipping 18 matching lines...) Expand all
262 return new ExtensionInstallPrompt(web_contents); 262 return new ExtensionInstallPrompt(web_contents);
263 } 263 }
264 264
265 // static 265 // static
266 ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile( 266 ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile(
267 Profile* profile) { 267 Profile* profile) {
268 Browser* browser = chrome::FindLastActiveWithProfile(profile, 268 Browser* browser = chrome::FindLastActiveWithProfile(profile,
269 chrome::GetActiveDesktop()); 269 chrome::GetActiveDesktop());
270 return CreateInstallPromptWithBrowser(browser); 270 return CreateInstallPromptWithBrowser(browser);
271 } 271 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698