Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: ash/test/test_shell_delegate.cc

Issue 2821303004: cros: Suspend media sessions with display off trigger by tablet power button (Closed)
Patch Set: feedback & remove resuming Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/gpu_support_stub.h" 9 #include "ash/gpu_support_stub.h"
10 #include "ash/palette_delegate.h" 10 #include "ash/palette_delegate.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 shelf->SetAlignment(SHELF_ALIGNMENT_BOTTOM); 47 shelf->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
48 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); 48 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
49 shelf->UpdateVisibilityState(); 49 shelf->UpdateVisibilityState();
50 } 50 }
51 } 51 }
52 52
53 private: 53 private:
54 DISALLOW_COPY_AND_ASSIGN(ShelfInitializer); 54 DISALLOW_COPY_AND_ASSIGN(ShelfInitializer);
55 }; 55 };
56 56
57 TestShellDelegate::TestShellDelegate() 57 TestShellDelegate::TestShellDelegate() = default;
58 : num_exit_requests_(0),
59 multi_profiles_enabled_(false),
60 force_maximize_on_first_run_(false),
61 touchscreen_enabled_in_local_pref_(true),
62 active_user_pref_service_(nullptr) {}
63 58
64 TestShellDelegate::~TestShellDelegate() {} 59 TestShellDelegate::~TestShellDelegate() = default;
65 60
66 ::service_manager::Connector* TestShellDelegate::GetShellConnector() const { 61 ::service_manager::Connector* TestShellDelegate::GetShellConnector() const {
67 return nullptr; 62 return nullptr;
68 } 63 }
69 64
70 bool TestShellDelegate::IsIncognitoAllowed() const { 65 bool TestShellDelegate::IsIncognitoAllowed() const {
71 return true; 66 return true;
72 } 67 }
73 68
74 bool TestShellDelegate::IsMultiProfilesEnabled() const { 69 bool TestShellDelegate::IsMultiProfilesEnabled() const {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 153 }
159 154
160 void TestShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled, 155 void TestShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled,
161 bool use_local_state) { 156 bool use_local_state) {
162 if (use_local_state) 157 if (use_local_state)
163 touchscreen_enabled_in_local_pref_ = enabled; 158 touchscreen_enabled_in_local_pref_ = enabled;
164 } 159 }
165 160
166 void TestShellDelegate::UpdateTouchscreenStatusFromPrefs() {} 161 void TestShellDelegate::UpdateTouchscreenStatusFromPrefs() {}
167 162
163 void TestShellDelegate::SuspendMediaSessions() {
164 media_sessions_suspended_ = true;
165 }
166
168 } // namespace test 167 } // namespace test
169 } // namespace ash 168 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698