| 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_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" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 } // namespace | 105 } // namespace |
| 106 | 106 |
| 107 TestShellDelegate::TestShellDelegate() | 107 TestShellDelegate::TestShellDelegate() |
| 108 : num_exit_requests_(0), | 108 : num_exit_requests_(0), |
| 109 multi_profiles_enabled_(false), | 109 multi_profiles_enabled_(false), |
| 110 force_maximize_on_first_run_(false), | 110 force_maximize_on_first_run_(false), |
| 111 app_list_presenter_delegate_factory_(new AppListPresenterDelegateFactory( | 111 app_list_presenter_delegate_factory_(new AppListPresenterDelegateFactory( |
| 112 base::WrapUnique(new AppListViewDelegateFactoryImpl))) {} | 112 base::WrapUnique(new AppListViewDelegateFactoryImpl))) {} |
| 113 | 113 |
| 114 TestShellDelegate::~TestShellDelegate() { | 114 TestShellDelegate::~TestShellDelegate() {} |
| 115 } | |
| 116 | 115 |
| 117 bool TestShellDelegate::IsFirstRunAfterBoot() const { | 116 bool TestShellDelegate::IsFirstRunAfterBoot() const { |
| 118 return false; | 117 return false; |
| 119 } | 118 } |
| 120 | 119 |
| 121 bool TestShellDelegate::IsIncognitoAllowed() const { | 120 bool TestShellDelegate::IsIncognitoAllowed() const { |
| 122 return true; | 121 return true; |
| 123 } | 122 } |
| 124 | 123 |
| 125 bool TestShellDelegate::IsMultiProfilesEnabled() const { | 124 bool TestShellDelegate::IsMultiProfilesEnabled() const { |
| 126 return multi_profiles_enabled_; | 125 return multi_profiles_enabled_; |
| 127 } | 126 } |
| 128 | 127 |
| 129 bool TestShellDelegate::IsRunningInForcedAppMode() const { | 128 bool TestShellDelegate::IsRunningInForcedAppMode() const { |
| 130 return false; | 129 return false; |
| 131 } | 130 } |
| 132 | 131 |
| 133 bool TestShellDelegate::CanShowWindowForUser(WmWindow* window) const { | 132 bool TestShellDelegate::CanShowWindowForUser(WmWindow* window) const { |
| 134 return true; | 133 return true; |
| 135 } | 134 } |
| 136 | 135 |
| 137 bool TestShellDelegate::IsForceMaximizeOnFirstRun() const { | 136 bool TestShellDelegate::IsForceMaximizeOnFirstRun() const { |
| 138 return force_maximize_on_first_run_; | 137 return force_maximize_on_first_run_; |
| 139 } | 138 } |
| 140 | 139 |
| 141 void TestShellDelegate::PreInit() { | 140 void TestShellDelegate::PreInit() {} |
| 142 } | |
| 143 | 141 |
| 144 void TestShellDelegate::PreShutdown() { | 142 void TestShellDelegate::PreShutdown() {} |
| 145 } | |
| 146 | 143 |
| 147 void TestShellDelegate::Exit() { | 144 void TestShellDelegate::Exit() { |
| 148 num_exit_requests_++; | 145 num_exit_requests_++; |
| 149 } | 146 } |
| 150 | 147 |
| 151 keyboard::KeyboardUI* TestShellDelegate::CreateKeyboardUI() { | 148 keyboard::KeyboardUI* TestShellDelegate::CreateKeyboardUI() { |
| 152 return new TestKeyboardUI; | 149 return new TestKeyboardUI; |
| 153 } | 150 } |
| 154 | 151 |
| 155 void TestShellDelegate::VirtualKeyboardActivated(bool activated) { | 152 void TestShellDelegate::VirtualKeyboardActivated(bool activated) { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 void TestShellDelegate::SetMediaCaptureState(MediaCaptureState state) { | 229 void TestShellDelegate::SetMediaCaptureState(MediaCaptureState state) { |
| 233 #if defined(OS_CHROMEOS) | 230 #if defined(OS_CHROMEOS) |
| 234 static_cast<MediaDelegateImpl*>(Shell::GetInstance()->media_delegate()) | 231 static_cast<MediaDelegateImpl*>(Shell::GetInstance()->media_delegate()) |
| 235 ->set_media_capture_state(state); | 232 ->set_media_capture_state(state); |
| 236 WmShell::Get()->system_tray_notifier()->NotifyMediaCaptureChanged(); | 233 WmShell::Get()->system_tray_notifier()->NotifyMediaCaptureChanged(); |
| 237 #endif | 234 #endif |
| 238 } | 235 } |
| 239 | 236 |
| 240 } // namespace test | 237 } // namespace test |
| 241 } // namespace ash | 238 } // namespace ash |
| OLD | NEW |