OLD | NEW |
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/default_accessibility_delegate.h" | 9 #include "ash/default_accessibility_delegate.h" |
10 #include "ash/gpu_support_stub.h" | 10 #include "ash/gpu_support_stub.h" |
11 #include "ash/palette_delegate.h" | 11 #include "ash/palette_delegate.h" |
12 #include "ash/public/cpp/shell_window_ids.h" | 12 #include "ash/public/cpp/shell_window_ids.h" |
13 #include "ash/root_window_controller.h" | 13 #include "ash/root_window_controller.h" |
14 #include "ash/session/session_state_delegate.h" | 14 #include "ash/session/session_state_delegate.h" |
15 #include "ash/shelf/wm_shelf.h" | 15 #include "ash/shelf/wm_shelf.h" |
16 #include "ash/shell.h" | 16 #include "ash/shell.h" |
17 #include "ash/shell_observer.h" | 17 #include "ash/shell_observer.h" |
18 #include "ash/system/tray/system_tray_notifier.h" | 18 #include "ash/system/tray/system_tray_notifier.h" |
19 #include "ash/test/test_keyboard_ui.h" | 19 #include "ash/test/test_keyboard_ui.h" |
20 #include "ash/test/test_session_state_delegate.h" | 20 #include "ash/test/test_session_state_delegate.h" |
21 #include "ash/test/test_shelf_delegate.h" | |
22 #include "ash/test/test_system_tray_delegate.h" | 21 #include "ash/test/test_system_tray_delegate.h" |
23 #include "ash/test/test_wallpaper_delegate.h" | 22 #include "ash/test/test_wallpaper_delegate.h" |
24 #include "ash/wm/window_state.h" | 23 #include "ash/wm/window_state.h" |
25 #include "ash/wm/window_util.h" | 24 #include "ash/wm/window_util.h" |
26 #include "ash/wm_window.h" | 25 #include "ash/wm_window.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/aura/window.h" | 28 #include "ui/aura/window.h" |
30 #include "ui/gfx/image/image.h" | 29 #include "ui/gfx/image/image.h" |
31 | 30 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 void TestShellDelegate::Exit() { | 93 void TestShellDelegate::Exit() { |
95 num_exit_requests_++; | 94 num_exit_requests_++; |
96 } | 95 } |
97 | 96 |
98 keyboard::KeyboardUI* TestShellDelegate::CreateKeyboardUI() { | 97 keyboard::KeyboardUI* TestShellDelegate::CreateKeyboardUI() { |
99 return new TestKeyboardUI; | 98 return new TestKeyboardUI; |
100 } | 99 } |
101 | 100 |
102 void TestShellDelegate::OpenUrlFromArc(const GURL& url) {} | 101 void TestShellDelegate::OpenUrlFromArc(const GURL& url) {} |
103 | 102 |
104 ShelfDelegate* TestShellDelegate::CreateShelfDelegate(ShelfModel* model) { | 103 void TestShellDelegate::ShelfInit() { |
105 // Create a separate shelf initializer that mimics ChromeLauncherController. | 104 // Create a separate shelf initializer that mimics ChromeLauncherController. |
106 shelf_initializer_ = base::MakeUnique<ShelfInitializer>(); | 105 if (!shelf_initializer_) |
107 return new TestShelfDelegate(); | 106 shelf_initializer_ = base::MakeUnique<ShelfInitializer>(); |
108 } | 107 } |
109 | 108 |
110 SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate() { | 109 SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate() { |
111 return new TestSystemTrayDelegate; | 110 return new TestSystemTrayDelegate; |
112 } | 111 } |
113 | 112 |
114 std::unique_ptr<WallpaperDelegate> | 113 std::unique_ptr<WallpaperDelegate> |
115 TestShellDelegate::CreateWallpaperDelegate() { | 114 TestShellDelegate::CreateWallpaperDelegate() { |
116 return base::MakeUnique<TestWallpaperDelegate>(); | 115 return base::MakeUnique<TestWallpaperDelegate>(); |
117 } | 116 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 void TestShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled, | 153 void TestShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled, |
155 bool use_local_state) { | 154 bool use_local_state) { |
156 if (use_local_state) | 155 if (use_local_state) |
157 touchscreen_enabled_in_local_pref_ = enabled; | 156 touchscreen_enabled_in_local_pref_ = enabled; |
158 } | 157 } |
159 | 158 |
160 void TestShellDelegate::UpdateTouchscreenStatusFromPrefs() {} | 159 void TestShellDelegate::UpdateTouchscreenStatusFromPrefs() {} |
161 | 160 |
162 } // namespace test | 161 } // namespace test |
163 } // namespace ash | 162 } // namespace ash |
OLD | NEW |