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

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

Issue 11834002: app_list: Split app_list_controller.* into two smaller parts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_controller.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/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"
11 #include "chrome/browser/extensions/extension_install_prompt.h" 11 #include "chrome/browser/extensions/extension_install_prompt.h"
12 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" 12 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/themes/theme_service.h" 14 #include "chrome/browser/themes/theme_service.h"
15 #include "chrome/browser/themes/theme_service_factory.h" 15 #include "chrome/browser/themes/theme_service_factory.h"
16 #include "chrome/browser/ui/app_list/app_list_controller.h" 16 #include "chrome/browser/ui/app_list/app_list_util.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/browser_dialogs.h" 18 #include "chrome/browser/ui/browser_dialogs.h"
19 #include "chrome/browser/ui/browser_finder.h" 19 #include "chrome/browser/ui/browser_finder.h"
20 #include "chrome/browser/ui/browser_navigator.h" 20 #include "chrome/browser/ui/browser_navigator.h"
21 #include "chrome/browser/ui/browser_tabstrip.h" 21 #include "chrome/browser/ui/browser_tabstrip.h"
22 #include "chrome/browser/ui/browser_window.h" 22 #include "chrome/browser/ui/browser_window.h"
23 #include "chrome/browser/ui/host_desktop.h" 23 #include "chrome/browser/ui/host_desktop.h"
24 #include "chrome/browser/ui/simple_message_box.h" 24 #include "chrome/browser/ui/simple_message_box.h"
25 #include "chrome/browser/ui/singleton_tabs.h" 25 #include "chrome/browser/ui/singleton_tabs.h"
26 #include "chrome/browser/ui/tabs/tab_strip_model.h" 26 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 176 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(USE_ASH) 212 #if defined(USE_ASH)
213 app_list_controller::ShowAppList(); 213 chrome::ShowAppList();
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
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698