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

Side by Side Diff: ash/test/test_shell_delegate.cc

Issue 2267023003: ash: Eliminate PointerWatcherDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate.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 "ash/test/test_shell_delegate.h" 5 #include "ash/test/test_shell_delegate.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/app_list/app_list_presenter_delegate.h" 9 #include "ash/app_list/app_list_presenter_delegate.h"
10 #include "ash/app_list/app_list_presenter_delegate_factory.h" 10 #include "ash/app_list/app_list_presenter_delegate_factory.h"
11 #include "ash/common/default_accessibility_delegate.h" 11 #include "ash/common/default_accessibility_delegate.h"
12 #include "ash/common/gpu_support_stub.h" 12 #include "ash/common/gpu_support_stub.h"
13 #include "ash/common/media_delegate.h" 13 #include "ash/common/media_delegate.h"
14 #include "ash/common/new_window_delegate.h" 14 #include "ash/common/new_window_delegate.h"
15 #include "ash/common/palette_delegate.h" 15 #include "ash/common/palette_delegate.h"
16 #include "ash/common/session/session_state_delegate.h" 16 #include "ash/common/session/session_state_delegate.h"
17 #include "ash/common/shell_window_ids.h" 17 #include "ash/common/shell_window_ids.h"
18 #include "ash/common/wm/window_state.h" 18 #include "ash/common/wm/window_state.h"
19 #include "ash/common/wm_shell.h" 19 #include "ash/common/wm_shell.h"
20 #include "ash/pointer_watcher_delegate_aura.h"
21 #include "ash/test/test_keyboard_ui.h" 20 #include "ash/test/test_keyboard_ui.h"
22 #include "ash/test/test_session_state_delegate.h" 21 #include "ash/test/test_session_state_delegate.h"
23 #include "ash/test/test_shelf_delegate.h" 22 #include "ash/test/test_shelf_delegate.h"
24 #include "ash/test/test_system_tray_delegate.h" 23 #include "ash/test/test_system_tray_delegate.h"
25 #include "ash/test/test_user_wallpaper_delegate.h" 24 #include "ash/test/test_user_wallpaper_delegate.h"
26 #include "ash/wm/window_util.h" 25 #include "ash/wm/window_util.h"
27 #include "base/logging.h" 26 #include "base/logging.h"
28 #include "base/memory/ptr_util.h" 27 #include "base/memory/ptr_util.h"
29 #include "ui/app_list/presenter/app_list_presenter_impl.h" 28 #include "ui/app_list/presenter/app_list_presenter_impl.h"
30 #include "ui/app_list/presenter/app_list_view_delegate_factory.h" 29 #include "ui/app_list/presenter/app_list_view_delegate_factory.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 183 }
185 184
186 MediaDelegate* TestShellDelegate::CreateMediaDelegate() { 185 MediaDelegate* TestShellDelegate::CreateMediaDelegate() {
187 return new MediaDelegateImpl; 186 return new MediaDelegateImpl;
188 } 187 }
189 188
190 std::unique_ptr<PaletteDelegate> TestShellDelegate::CreatePaletteDelegate() { 189 std::unique_ptr<PaletteDelegate> TestShellDelegate::CreatePaletteDelegate() {
191 return nullptr; 190 return nullptr;
192 } 191 }
193 192
194 std::unique_ptr<PointerWatcherDelegate>
195 TestShellDelegate::CreatePointerWatcherDelegate() {
196 return base::WrapUnique(new PointerWatcherDelegateAura);
197 }
198
199 ui::MenuModel* TestShellDelegate::CreateContextMenu(WmShelf* wm_shelf, 193 ui::MenuModel* TestShellDelegate::CreateContextMenu(WmShelf* wm_shelf,
200 const ShelfItem* item) { 194 const ShelfItem* item) {
201 return nullptr; 195 return nullptr;
202 } 196 }
203 197
204 GPUSupport* TestShellDelegate::CreateGPUSupport() { 198 GPUSupport* TestShellDelegate::CreateGPUSupport() {
205 // Real GPU support depends on src/content, so just use a stub. 199 // Real GPU support depends on src/content, so just use a stub.
206 return new GPUSupportStub; 200 return new GPUSupportStub;
207 } 201 }
208 202
209 base::string16 TestShellDelegate::GetProductName() const { 203 base::string16 TestShellDelegate::GetProductName() const {
210 return base::string16(); 204 return base::string16();
211 } 205 }
212 206
213 gfx::Image TestShellDelegate::GetDeprecatedAcceleratorImage() const { 207 gfx::Image TestShellDelegate::GetDeprecatedAcceleratorImage() const {
214 return gfx::Image(); 208 return gfx::Image();
215 } 209 }
216 210
217 void TestShellDelegate::SetMediaCaptureState(MediaCaptureState state) { 211 void TestShellDelegate::SetMediaCaptureState(MediaCaptureState state) {
218 #if defined(OS_CHROMEOS) 212 #if defined(OS_CHROMEOS)
219 static_cast<MediaDelegateImpl*>(WmShell::Get()->media_delegate()) 213 static_cast<MediaDelegateImpl*>(WmShell::Get()->media_delegate())
220 ->set_media_capture_state(state); 214 ->set_media_capture_state(state);
221 WmShell::Get()->system_tray_notifier()->NotifyMediaCaptureChanged(); 215 WmShell::Get()->system_tray_notifier()->NotifyMediaCaptureChanged();
222 #endif 216 #endif
223 } 217 }
224 218
225 } // namespace test 219 } // namespace test
226 } // namespace ash 220 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_shell_delegate.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698