| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl); | 80 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace | 83 } // namespace |
| 84 | 84 |
| 85 TestShellDelegate::TestShellDelegate() | 85 TestShellDelegate::TestShellDelegate() |
| 86 : num_exit_requests_(0), | 86 : num_exit_requests_(0), |
| 87 multi_profiles_enabled_(false), | 87 multi_profiles_enabled_(false), |
| 88 force_maximize_on_first_run_(false), | 88 force_maximize_on_first_run_(false), |
| 89 touchscreen_enabled_in_local_pref_(true), |
| 89 app_list_presenter_delegate_factory_(new AppListPresenterDelegateFactory( | 90 app_list_presenter_delegate_factory_(new AppListPresenterDelegateFactory( |
| 90 base::WrapUnique(new AppListViewDelegateFactoryImpl))) {} | 91 base::WrapUnique(new AppListViewDelegateFactoryImpl))) {} |
| 91 | 92 |
| 92 TestShellDelegate::~TestShellDelegate() {} | 93 TestShellDelegate::~TestShellDelegate() {} |
| 93 | 94 |
| 94 ::service_manager::Connector* TestShellDelegate::GetShellConnector() const { | 95 ::service_manager::Connector* TestShellDelegate::GetShellConnector() const { |
| 95 return nullptr; | 96 return nullptr; |
| 96 } | 97 } |
| 97 | 98 |
| 98 bool TestShellDelegate::IsIncognitoAllowed() const { | 99 bool TestShellDelegate::IsIncognitoAllowed() const { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 178 } |
| 178 | 179 |
| 179 base::string16 TestShellDelegate::GetProductName() const { | 180 base::string16 TestShellDelegate::GetProductName() const { |
| 180 return base::string16(); | 181 return base::string16(); |
| 181 } | 182 } |
| 182 | 183 |
| 183 gfx::Image TestShellDelegate::GetDeprecatedAcceleratorImage() const { | 184 gfx::Image TestShellDelegate::GetDeprecatedAcceleratorImage() const { |
| 184 return gfx::Image(); | 185 return gfx::Image(); |
| 185 } | 186 } |
| 186 | 187 |
| 188 bool TestShellDelegate::IsTouchscreenEnabledInPrefs( |
| 189 bool use_local_state) const { |
| 190 return use_local_state ? touchscreen_enabled_in_local_pref_ : true; |
| 191 } |
| 192 |
| 193 void TestShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled, |
| 194 bool use_local_state) { |
| 195 if (use_local_state) |
| 196 touchscreen_enabled_in_local_pref_ = enabled; |
| 197 } |
| 198 |
| 199 void TestShellDelegate::UpdateTouchscreenStatusFromPrefs() {} |
| 200 |
| 187 void TestShellDelegate::SetMediaCaptureState(MediaCaptureState state) { | 201 void TestShellDelegate::SetMediaCaptureState(MediaCaptureState state) { |
| 188 #if defined(OS_CHROMEOS) | 202 #if defined(OS_CHROMEOS) |
| 189 static_cast<MediaDelegateImpl*>(WmShell::Get()->media_delegate()) | 203 static_cast<MediaDelegateImpl*>(WmShell::Get()->media_delegate()) |
| 190 ->set_media_capture_state(state); | 204 ->set_media_capture_state(state); |
| 191 WmShell::Get()->system_tray_notifier()->NotifyMediaCaptureChanged(); | 205 WmShell::Get()->system_tray_notifier()->NotifyMediaCaptureChanged(); |
| 192 #endif | 206 #endif |
| 193 } | 207 } |
| 194 | 208 |
| 195 } // namespace test | 209 } // namespace test |
| 196 } // namespace ash | 210 } // namespace ash |
| OLD | NEW |