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

Side by Side Diff: ui/display/chromeos/test/test_native_display_delegate.cc

Issue 1861593002: chromeos: Turn off displays on suspend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chromeos: Add functions for configuring cached displays Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/display/chromeos/test/test_native_display_delegate.h" 5 #include "ui/display/chromeos/test/test_native_display_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "ui/display/chromeos/test/action_logger.h" 9 #include "ui/display/chromeos/test/action_logger.h"
10 #include "ui/display/types/display_mode.h" 10 #include "ui/display/types/display_mode.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 void TestNativeDisplayDelegate::SetBackgroundColor(uint32_t color_argb) { 55 void TestNativeDisplayDelegate::SetBackgroundColor(uint32_t color_argb) {
56 log_->AppendAction(GetBackgroundAction(color_argb)); 56 log_->AppendAction(GetBackgroundAction(color_argb));
57 } 57 }
58 58
59 void TestNativeDisplayDelegate::ForceDPMSOn() { 59 void TestNativeDisplayDelegate::ForceDPMSOn() {
60 log_->AppendAction(kForceDPMS); 60 log_->AppendAction(kForceDPMS);
61 } 61 }
62 62
63 void TestNativeDisplayDelegate::GetCachedDisplays(
64 const GetDisplaysCallback& callback) {
65 callback.Run(outputs_);
66 }
67
63 void TestNativeDisplayDelegate::GetDisplays( 68 void TestNativeDisplayDelegate::GetDisplays(
64 const GetDisplaysCallback& callback) { 69 const GetDisplaysCallback& callback) {
65 if (run_async_) { 70 if (run_async_) {
66 base::MessageLoop::current()->PostTask(FROM_HERE, 71 base::MessageLoop::current()->PostTask(FROM_HERE,
67 base::Bind(callback, outputs_)); 72 base::Bind(callback, outputs_));
68 } else { 73 } else {
69 callback.Run(outputs_); 74 callback.Run(outputs_);
70 } 75 }
71 } 76 }
72 77
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 151
147 void TestNativeDisplayDelegate::AddObserver(NativeDisplayObserver* observer) { 152 void TestNativeDisplayDelegate::AddObserver(NativeDisplayObserver* observer) {
148 } 153 }
149 154
150 void TestNativeDisplayDelegate::RemoveObserver( 155 void TestNativeDisplayDelegate::RemoveObserver(
151 NativeDisplayObserver* observer) { 156 NativeDisplayObserver* observer) {
152 } 157 }
153 158
154 } // namespace test 159 } // namespace test
155 } // namespace ui 160 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/chromeos/test/test_native_display_delegate.h ('k') | ui/display/chromeos/update_display_configuration_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698