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

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 1770993002: wip: Refactoring Ash's AppListController, moving the bulk of the logic to chrome/browser/ui/ash/app… Base URL: https://chromium.googlesource.com/chromium/src.git@small_5_apps
Patch Set: Added a comment for PostTask in AppListServiceAsh. Created 4 years, 9 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/ui/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/content/gpu_support_impl.h" 9 #include "ash/content/gpu_support_impl.h"
10 #include "ash/session/session_state_delegate.h" 10 #include "ash/session/session_state_delegate.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
22 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 22 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
23 #include "chrome/browser/ui/ash/session_util.h" 23 #include "chrome/browser/ui/ash/session_util.h"
24 #include "chrome/browser/ui/browser_commands.h" 24 #include "chrome/browser/ui/browser_commands.h"
25 #include "chrome/browser/ui/browser_finder.h" 25 #include "chrome/browser/ui/browser_finder.h"
26 #include "chrome/browser/ui/browser_navigator.h" 26 #include "chrome/browser/ui/browser_navigator.h"
27 #include "chrome/browser/ui/browser_navigator_params.h" 27 #include "chrome/browser/ui/browser_navigator_params.h"
28 #include "chrome/browser/ui/browser_window.h" 28 #include "chrome/browser/ui/browser_window.h"
29 #include "chrome/grit/chromium_strings.h" 29 #include "chrome/grit/chromium_strings.h"
30 #include "grit/theme_resources.h" 30 #include "grit/theme_resources.h"
31 #include "ui/app_list/app_list_controller.h"
31 #include "ui/base/l10n/l10n_util.h" 32 #include "ui/base/l10n/l10n_util.h"
32 #include "ui/base/resource/resource_bundle.h" 33 #include "ui/base/resource/resource_bundle.h"
33 34
34 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
35 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 36 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
36 #include "chrome/browser/chromeos/display/display_configuration_observer.h" 37 #include "chrome/browser/chromeos/display/display_configuration_observer.h"
37 #include "chrome/browser/chromeos/profiles/profile_helper.h" 38 #include "chrome/browser/chromeos/profiles/profile_helper.h"
38 #include "chrome/browser/chromeos/system/input_device_settings.h" 39 #include "chrome/browser/chromeos/system/input_device_settings.h"
39 #include "chrome/browser/profiles/profile.h" 40 #include "chrome/browser/profiles/profile.h"
40 #include "chrome/common/pref_names.h" 41 #include "chrome/common/pref_names.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 ->GetBoolean(prefs::kForceMaximizeOnFirstRun); 114 ->GetBoolean(prefs::kForceMaximizeOnFirstRun);
114 } 115 }
115 #endif 116 #endif
116 return false; 117 return false;
117 } 118 }
118 119
119 void ChromeShellDelegate::Exit() { 120 void ChromeShellDelegate::Exit() {
120 chrome::AttemptUserExit(); 121 chrome::AttemptUserExit();
121 } 122 }
122 123
123 app_list::AppListViewDelegate* ChromeShellDelegate::GetAppListViewDelegate() { 124 app_list::AppListController* ChromeShellDelegate::GetAppListController() {
124 DCHECK(ash::Shell::HasInstance()); 125 DCHECK(ash::Shell::HasInstance());
125 return AppListServiceAsh::GetInstance()->GetViewDelegate( 126 return AppListServiceAsh::GetInstance()->GetAppListController();
126 Profile::FromBrowserContext(GetActiveBrowserContext()));
127 } 127 }
128 128
129 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( 129 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate(
130 ash::ShelfModel* model) { 130 ash::ShelfModel* model) {
131 if (!shelf_delegate_) { 131 if (!shelf_delegate_) {
132 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); 132 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model);
133 shelf_delegate_->Init(); 133 shelf_delegate_->Init();
134 } 134 }
135 return shelf_delegate_; 135 return shelf_delegate_;
136 } 136 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( 206 void ChromeShellDelegate::AddVirtualKeyboardStateObserver(
207 ash::VirtualKeyboardStateObserver* observer) { 207 ash::VirtualKeyboardStateObserver* observer) {
208 keyboard_state_observer_list_.AddObserver(observer); 208 keyboard_state_observer_list_.AddObserver(observer);
209 } 209 }
210 210
211 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( 211 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver(
212 ash::VirtualKeyboardStateObserver* observer) { 212 ash::VirtualKeyboardStateObserver* observer) {
213 keyboard_state_observer_list_.RemoveObserver(observer); 213 keyboard_state_observer_list_.RemoveObserver(observer);
214 } 214 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698