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

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: rebase 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // Don't show context menu for exclusive app runtime mode. 136 // Don't show context menu for exclusive app runtime mode.
138 if (chrome::IsRunningInAppMode()) 137 if (chrome::IsRunningInAppMode())
139 return NULL; 138 return NULL;
140 139
141 if (item_delegate && item) 140 if (item_delegate && item)
142 return new LauncherContextMenu(shelf_delegate_, item_delegate, item, root); 141 return new LauncherContextMenu(shelf_delegate_, item_delegate, item, root);
143 142
144 return new LauncherContextMenu(shelf_delegate_, root); 143 return new LauncherContextMenu(shelf_delegate_, root);
145 } 144 }
146 145
147 ash::WindowTreeHostFactory* ChromeShellDelegate::CreateWindowTreeHostFactory() {
148 return ash::WindowTreeHostFactory::Create();
149 }
150
151 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { 146 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() {
152 // Chrome uses real GPU support. 147 // Chrome uses real GPU support.
153 return new ash::GPUSupportImpl; 148 return new ash::GPUSupportImpl;
154 } 149 }
155 150
156 base::string16 ChromeShellDelegate::GetProductName() const { 151 base::string16 ChromeShellDelegate::GetProductName() const {
157 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 152 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
158 } 153 }
159 154
160 keyboard::KeyboardControllerProxy* 155 keyboard::KeyboardControllerProxy*
161 ChromeShellDelegate::CreateKeyboardControllerProxy() { 156 ChromeShellDelegate::CreateKeyboardControllerProxy() {
162 return new AshKeyboardControllerProxy(); 157 return new AshKeyboardControllerProxy();
163 } 158 }
164 159
165 void ChromeShellDelegate::VirtualKeyboardActivated(bool activated) { 160 void ChromeShellDelegate::VirtualKeyboardActivated(bool activated) {
166 FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver, 161 FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver,
167 keyboard_state_observer_list_, 162 keyboard_state_observer_list_,
168 OnVirtualKeyboardStateChanged(activated)); 163 OnVirtualKeyboardStateChanged(activated));
169 } 164 }
170 165
171 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( 166 void ChromeShellDelegate::AddVirtualKeyboardStateObserver(
172 ash::VirtualKeyboardStateObserver* observer) { 167 ash::VirtualKeyboardStateObserver* observer) {
173 keyboard_state_observer_list_.AddObserver(observer); 168 keyboard_state_observer_list_.AddObserver(observer);
174 } 169 }
175 170
176 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( 171 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver(
177 ash::VirtualKeyboardStateObserver* observer) { 172 ash::VirtualKeyboardStateObserver* observer) {
178 keyboard_state_observer_list_.RemoveObserver(observer); 173 keyboard_state_observer_list_.RemoveObserver(observer);
179 } 174 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | mojo/examples/aura_demo/window_tree_host_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698