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

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

Issue 201573015: Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 8 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/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "ash/content_support/gpu_support_impl.h" 9 #include "ash/content_support/gpu_support_impl.h"
10 #include "ash/host/window_tree_host_factory.h"
11 #include "ash/magnifier/magnifier_constants.h" 10 #include "ash/magnifier/magnifier_constants.h"
12 #include "ash/wm/window_state.h" 11 #include "ash/wm/window_state.h"
13 #include "ash/wm/window_util.h" 12 #include "ash/wm/window_util.h"
14 #include "base/command_line.h" 13 #include "base/command_line.h"
15 #include "chrome/browser/app_mode/app_mode_utils.h" 14 #include "chrome/browser/app_mode/app_mode_utils.h"
16 #include "chrome/browser/lifetime/application_lifetime.h" 15 #include "chrome/browser/lifetime/application_lifetime.h"
17 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/ui/app_list/app_list_service.h" 17 #include "chrome/browser/ui/app_list/app_list_service.h"
19 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" 18 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
20 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h" 19 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Don't show context menu for exclusive app runtime mode. 128 // Don't show context menu for exclusive app runtime mode.
130 if (chrome::IsRunningInAppMode()) 129 if (chrome::IsRunningInAppMode())
131 return NULL; 130 return NULL;
132 131
133 if (item_delegate && item) 132 if (item_delegate && item)
134 return new LauncherContextMenu(shelf_delegate_, item_delegate, item, root); 133 return new LauncherContextMenu(shelf_delegate_, item_delegate, item, root);
135 134
136 return new LauncherContextMenu(shelf_delegate_, root); 135 return new LauncherContextMenu(shelf_delegate_, root);
137 } 136 }
138 137
139 ash::WindowTreeHostFactory* ChromeShellDelegate::CreateWindowTreeHostFactory() {
140 return ash::WindowTreeHostFactory::Create();
141 }
142
143 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { 138 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() {
144 // Chrome uses real GPU support. 139 // Chrome uses real GPU support.
145 return new ash::GPUSupportImpl; 140 return new ash::GPUSupportImpl;
146 } 141 }
147 142
148 base::string16 ChromeShellDelegate::GetProductName() const { 143 base::string16 ChromeShellDelegate::GetProductName() const {
149 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 144 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
150 } 145 }
151 146
152 keyboard::KeyboardControllerProxy* 147 keyboard::KeyboardControllerProxy*
153 ChromeShellDelegate::CreateKeyboardControllerProxy() { 148 ChromeShellDelegate::CreateKeyboardControllerProxy() {
154 return new AshKeyboardControllerProxy(); 149 return new AshKeyboardControllerProxy();
155 } 150 }
156 151
157 void ChromeShellDelegate::VirtualKeyboardActivated(bool activated) { 152 void ChromeShellDelegate::VirtualKeyboardActivated(bool activated) {
158 FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver, 153 FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver,
159 keyboard_state_observer_list_, 154 keyboard_state_observer_list_,
160 OnVirtualKeyboardStateChanged(activated)); 155 OnVirtualKeyboardStateChanged(activated));
161 } 156 }
162 157
163 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( 158 void ChromeShellDelegate::AddVirtualKeyboardStateObserver(
164 ash::VirtualKeyboardStateObserver* observer) { 159 ash::VirtualKeyboardStateObserver* observer) {
165 keyboard_state_observer_list_.AddObserver(observer); 160 keyboard_state_observer_list_.AddObserver(observer);
166 } 161 }
167 162
168 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( 163 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver(
169 ash::VirtualKeyboardStateObserver* observer) { 164 ash::VirtualKeyboardStateObserver* observer) {
170 keyboard_state_observer_list_.RemoveObserver(observer); 165 keyboard_state_observer_list_.RemoveObserver(observer);
171 } 166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698