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" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void TestShellDelegate::Exit() { | 116 void TestShellDelegate::Exit() { |
117 num_exit_requests_++; | 117 num_exit_requests_++; |
118 } | 118 } |
119 | 119 |
120 keyboard::KeyboardControllerProxy* | 120 keyboard::KeyboardControllerProxy* |
121 TestShellDelegate::CreateKeyboardControllerProxy() { | 121 TestShellDelegate::CreateKeyboardControllerProxy() { |
122 return new KeyboardControllerProxyStub(); | 122 return new KeyboardControllerProxyStub(); |
123 } | 123 } |
124 | 124 |
125 void TestShellDelegate::VirtualKeyboardActivated(bool activated) { | 125 void TestShellDelegate::VirtualKeyboardActivated(bool activated) { |
| 126 FOR_EACH_OBSERVER(ash::VirtualKeyboardStateObserver, |
| 127 keyboard_state_observer_list_, |
| 128 OnVirtualKeyboardStateChanged(activated)); |
126 } | 129 } |
127 | 130 |
128 void TestShellDelegate::AddVirtualKeyboardStateObserver( | 131 void TestShellDelegate::AddVirtualKeyboardStateObserver( |
129 VirtualKeyboardStateObserver* observer) { | 132 VirtualKeyboardStateObserver* observer) { |
| 133 keyboard_state_observer_list_.AddObserver(observer); |
130 } | 134 } |
131 | 135 |
132 void TestShellDelegate::RemoveVirtualKeyboardStateObserver( | 136 void TestShellDelegate::RemoveVirtualKeyboardStateObserver( |
133 VirtualKeyboardStateObserver* observer) { | 137 VirtualKeyboardStateObserver* observer) { |
| 138 keyboard_state_observer_list_.RemoveObserver(observer); |
134 } | 139 } |
135 | 140 |
136 content::BrowserContext* TestShellDelegate::GetActiveBrowserContext() { | 141 content::BrowserContext* TestShellDelegate::GetActiveBrowserContext() { |
137 active_browser_context_.reset(new content::TestBrowserContext()); | 142 active_browser_context_.reset(new content::TestBrowserContext()); |
138 return active_browser_context_.get(); | 143 return active_browser_context_.get(); |
139 } | 144 } |
140 | 145 |
141 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { | 146 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { |
142 return new app_list::test::AppListTestViewDelegate; | 147 return new app_list::test::AppListTestViewDelegate; |
143 } | 148 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 #if defined(OS_CHROMEOS) | 197 #if defined(OS_CHROMEOS) |
193 Shell* shell = Shell::GetInstance(); | 198 Shell* shell = Shell::GetInstance(); |
194 static_cast<MediaDelegateImpl*>(shell->media_delegate()) | 199 static_cast<MediaDelegateImpl*>(shell->media_delegate()) |
195 ->set_media_capture_state(state); | 200 ->set_media_capture_state(state); |
196 shell->system_tray_notifier()->NotifyMediaCaptureChanged(); | 201 shell->system_tray_notifier()->NotifyMediaCaptureChanged(); |
197 #endif | 202 #endif |
198 } | 203 } |
199 | 204 |
200 } // namespace test | 205 } // namespace test |
201 } // namespace ash | 206 } // namespace ash |
OLD | NEW |