| 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/app_list/app_list_shower_delegate.h" | 9 #include "ash/app_list/app_list_presenter_delegate.h" |
| 10 #include "ash/app_list/app_list_shower_delegate_factory.h" | 10 #include "ash/app_list/app_list_presenter_delegate_factory.h" |
| 11 #include "ash/app_list/app_list_view_delegate_factory.h" | 11 #include "ash/app_list/app_list_view_delegate_factory.h" |
| 12 #include "ash/default_accessibility_delegate.h" | 12 #include "ash/default_accessibility_delegate.h" |
| 13 #include "ash/gpu_support_stub.h" | 13 #include "ash/gpu_support_stub.h" |
| 14 #include "ash/media_delegate.h" | 14 #include "ash/media_delegate.h" |
| 15 #include "ash/new_window_delegate.h" | 15 #include "ash/new_window_delegate.h" |
| 16 #include "ash/session/session_state_delegate.h" | 16 #include "ash/session/session_state_delegate.h" |
| 17 #include "ash/shell.h" | 17 #include "ash/shell.h" |
| 18 #include "ash/shell_window_ids.h" | 18 #include "ash/shell_window_ids.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" | 21 #include "ash/test/test_shelf_delegate.h" |
| 22 #include "ash/test/test_system_tray_delegate.h" | 22 #include "ash/test/test_system_tray_delegate.h" |
| 23 #include "ash/test/test_user_wallpaper_delegate.h" | 23 #include "ash/test/test_user_wallpaper_delegate.h" |
| 24 #include "ash/wm/window_state.h" | 24 #include "ash/wm/window_state.h" |
| 25 #include "ash/wm/window_util.h" | 25 #include "ash/wm/window_util.h" |
| 26 #include "base/logging.h" | 26 #include "base/logging.h" |
| 27 #include "base/memory/ptr_util.h" | 27 #include "base/memory/ptr_util.h" |
| 28 #include "ui/app_list/shower/app_list_shower_impl.h" | 28 #include "ui/app_list/presenter/app_list_presenter_impl.h" |
| 29 #include "ui/app_list/test/app_list_test_view_delegate.h" | 29 #include "ui/app_list/test/app_list_test_view_delegate.h" |
| 30 #include "ui/aura/window.h" | 30 #include "ui/aura/window.h" |
| 31 #include "ui/gfx/image/image.h" | 31 #include "ui/gfx/image/image.h" |
| 32 | 32 |
| 33 #if defined(OS_CHROMEOS) | 33 #if defined(OS_CHROMEOS) |
| 34 #include "ash/system/tray/system_tray_notifier.h" | 34 #include "ash/system/tray/system_tray_notifier.h" |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 namespace ash { | 37 namespace ash { |
| 38 namespace test { | 38 namespace test { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl); | 99 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace | 102 } // namespace |
| 103 | 103 |
| 104 TestShellDelegate::TestShellDelegate() | 104 TestShellDelegate::TestShellDelegate() |
| 105 : num_exit_requests_(0), | 105 : num_exit_requests_(0), |
| 106 multi_profiles_enabled_(false), | 106 multi_profiles_enabled_(false), |
| 107 force_maximize_on_first_run_(false), | 107 force_maximize_on_first_run_(false), |
| 108 app_list_shower_delegate_factory_(new AppListShowerDelegateFactory( | 108 app_list_presenter_delegate_factory_(new AppListPresenterDelegateFactory( |
| 109 base::WrapUnique(new AppListViewDelegateFactoryImpl))) {} | 109 base::WrapUnique(new AppListViewDelegateFactoryImpl))) {} |
| 110 | 110 |
| 111 TestShellDelegate::~TestShellDelegate() { | 111 TestShellDelegate::~TestShellDelegate() { |
| 112 } | 112 } |
| 113 | 113 |
| 114 bool TestShellDelegate::IsFirstRunAfterBoot() const { | 114 bool TestShellDelegate::IsFirstRunAfterBoot() const { |
| 115 return false; | 115 return false; |
| 116 } | 116 } |
| 117 | 117 |
| 118 bool TestShellDelegate::IsIncognitoAllowed() const { | 118 bool TestShellDelegate::IsIncognitoAllowed() const { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 keyboard_state_observer_list_.AddObserver(observer); | 160 keyboard_state_observer_list_.AddObserver(observer); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void TestShellDelegate::RemoveVirtualKeyboardStateObserver( | 163 void TestShellDelegate::RemoveVirtualKeyboardStateObserver( |
| 164 VirtualKeyboardStateObserver* observer) { | 164 VirtualKeyboardStateObserver* observer) { |
| 165 keyboard_state_observer_list_.RemoveObserver(observer); | 165 keyboard_state_observer_list_.RemoveObserver(observer); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void TestShellDelegate::OpenUrl(const GURL& url) {} | 168 void TestShellDelegate::OpenUrl(const GURL& url) {} |
| 169 | 169 |
| 170 app_list::AppListShower* TestShellDelegate::GetAppListShower() { | 170 app_list::AppListPresenter* TestShellDelegate::GetAppListPresenter() { |
| 171 if (!app_list_shower_) { | 171 if (!app_list_presenter_) { |
| 172 app_list_shower_.reset(new app_list::AppListShowerImpl( | 172 app_list_presenter_.reset(new app_list::AppListPresenterImpl( |
| 173 app_list_shower_delegate_factory_.get())); | 173 app_list_presenter_delegate_factory_.get())); |
| 174 } | 174 } |
| 175 return app_list_shower_.get(); | 175 return app_list_presenter_.get(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 ShelfDelegate* TestShellDelegate::CreateShelfDelegate(ShelfModel* model) { | 178 ShelfDelegate* TestShellDelegate::CreateShelfDelegate(ShelfModel* model) { |
| 179 return new TestShelfDelegate(model); | 179 return new TestShelfDelegate(model); |
| 180 } | 180 } |
| 181 | 181 |
| 182 SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate() { | 182 SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate() { |
| 183 return new TestSystemTrayDelegate; | 183 return new TestSystemTrayDelegate; |
| 184 } | 184 } |
| 185 | 185 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 #if defined(OS_CHROMEOS) | 226 #if defined(OS_CHROMEOS) |
| 227 Shell* shell = Shell::GetInstance(); | 227 Shell* shell = Shell::GetInstance(); |
| 228 static_cast<MediaDelegateImpl*>(shell->media_delegate()) | 228 static_cast<MediaDelegateImpl*>(shell->media_delegate()) |
| 229 ->set_media_capture_state(state); | 229 ->set_media_capture_state(state); |
| 230 shell->system_tray_notifier()->NotifyMediaCaptureChanged(); | 230 shell->system_tray_notifier()->NotifyMediaCaptureChanged(); |
| 231 #endif | 231 #endif |
| 232 } | 232 } |
| 233 | 233 |
| 234 } // namespace test | 234 } // namespace test |
| 235 } // namespace ash | 235 } // namespace ash |
| OLD | NEW |