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

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

Issue 11968034: Enable profile switching for standalone App Launcher via the Settings App. (Closed) Base URL: git://nomatter.syd/chromium/src.git@master
Patch Set: Created 7 years, 11 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
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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
10 #include "chrome/browser/api/infobars/infobar_service.h" 10 #include "chrome/browser/api/infobars/infobar_service.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams( 203 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams(
204 browser, GURL(chrome::kChromeUINewTabURL))); 204 browser, GURL(chrome::kChromeUINewTabURL)));
205 chrome::Navigate(&params); 205 chrome::Navigate(&params);
206 206
207 content::NotificationService::current()->Notify( 207 content::NotificationService::current()->Notify(
208 chrome::NOTIFICATION_APP_INSTALLED_TO_NTP, 208 chrome::NOTIFICATION_APP_INSTALLED_TO_NTP,
209 content::Source<WebContents>(params.target_contents), 209 content::Source<WebContents>(params.target_contents),
210 content::Details<const std::string>(&app_id)); 210 content::Details<const std::string>(&app_id));
211 } else { 211 } else {
212 #if defined(ENABLE_APP_LIST) 212 #if defined(ENABLE_APP_LIST)
213 chrome::ShowAppList(); 213 chrome::ShowAppList(browser->profile());
214 214
215 content::NotificationService::current()->Notify( 215 content::NotificationService::current()->Notify(
216 chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST, 216 chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST,
217 content::Source<Profile>(browser->profile()), 217 content::Source<Profile>(browser->profile()),
218 content::Details<const std::string>(&app_id)); 218 content::Details<const std::string>(&app_id));
219 #else 219 #else
220 NOTREACHED(); 220 NOTREACHED();
221 #endif 221 #endif
222 } 222 }
223 } 223 }
(...skipping 12 matching lines...) Expand all
236 return new ExtensionInstallPrompt(web_contents); 236 return new ExtensionInstallPrompt(web_contents);
237 } 237 }
238 238
239 // static 239 // static
240 ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile( 240 ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile(
241 Profile* profile) { 241 Profile* profile) {
242 Browser* browser = chrome::FindLastActiveWithProfile(profile, 242 Browser* browser = chrome::FindLastActiveWithProfile(profile,
243 chrome::GetActiveDesktop()); 243 chrome::GetActiveDesktop());
244 return CreateInstallPromptWithBrowser(browser); 244 return CreateInstallPromptWithBrowser(browser);
245 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698