| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 void TestShellDelegate::RemoveVirtualKeyboardStateObserver( | 136 void TestShellDelegate::RemoveVirtualKeyboardStateObserver( |
| 137 VirtualKeyboardStateObserver* observer) { | 137 VirtualKeyboardStateObserver* observer) { |
| 138 keyboard_state_observer_list_.RemoveObserver(observer); | 138 keyboard_state_observer_list_.RemoveObserver(observer); |
| 139 } | 139 } |
| 140 | 140 |
| 141 content::BrowserContext* TestShellDelegate::GetActiveBrowserContext() { | 141 content::BrowserContext* TestShellDelegate::GetActiveBrowserContext() { |
| 142 active_browser_context_.reset(new content::TestBrowserContext()); | 142 active_browser_context_.reset(new content::TestBrowserContext()); |
| 143 return active_browser_context_.get(); | 143 return active_browser_context_.get(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { | 146 app_list::AppListViewDelegate* TestShellDelegate::GetAppListViewDelegate() { |
| 147 return new app_list::test::AppListTestViewDelegate; | 147 if (!app_list_view_delegate_) |
| 148 app_list_view_delegate_.reset(new app_list::test::AppListTestViewDelegate); |
| 149 return app_list_view_delegate_.get(); |
| 148 } | 150 } |
| 149 | 151 |
| 150 ShelfDelegate* TestShellDelegate::CreateShelfDelegate(ShelfModel* model) { | 152 ShelfDelegate* TestShellDelegate::CreateShelfDelegate(ShelfModel* model) { |
| 151 return new TestShelfDelegate(model); | 153 return new TestShelfDelegate(model); |
| 152 } | 154 } |
| 153 | 155 |
| 154 SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate() { | 156 SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate() { |
| 155 return new TestSystemTrayDelegate; | 157 return new TestSystemTrayDelegate; |
| 156 } | 158 } |
| 157 | 159 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 #if defined(OS_CHROMEOS) | 199 #if defined(OS_CHROMEOS) |
| 198 Shell* shell = Shell::GetInstance(); | 200 Shell* shell = Shell::GetInstance(); |
| 199 static_cast<MediaDelegateImpl*>(shell->media_delegate()) | 201 static_cast<MediaDelegateImpl*>(shell->media_delegate()) |
| 200 ->set_media_capture_state(state); | 202 ->set_media_capture_state(state); |
| 201 shell->system_tray_notifier()->NotifyMediaCaptureChanged(); | 203 shell->system_tray_notifier()->NotifyMediaCaptureChanged(); |
| 202 #endif | 204 #endif |
| 203 } | 205 } |
| 204 | 206 |
| 205 } // namespace test | 207 } // namespace test |
| 206 } // namespace ash | 208 } // namespace ash |
| OLD | NEW |