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

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

Issue 2324163002: Add FakeDisplayDelegate for off device usage. (Closed)
Patch Set: Fix windows compile problems. Created 4 years, 3 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/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (run_async_) { 99 if (run_async_) {
100 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 100 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
101 base::Bind(callback, result)); 101 base::Bind(callback, result));
102 } else { 102 } else {
103 callback.Run(result); 103 callback.Run(result);
104 } 104 }
105 } 105 }
106 106
107 void TestNativeDisplayDelegate::CreateFrameBuffer(const gfx::Size& size) { 107 void TestNativeDisplayDelegate::CreateFrameBuffer(const gfx::Size& size) {
108 log_->AppendAction( 108 log_->AppendAction(
109 GetFramebufferAction(size, outputs_.size() >= 1 ? outputs_[0] : NULL, 109 GetFramebufferAction(size, outputs_.size() >= 1 ? outputs_[0] : nullptr,
110 outputs_.size() >= 2 ? outputs_[1] : NULL)); 110 outputs_.size() >= 2 ? outputs_[1] : nullptr));
111 } 111 }
112 112
113 void TestNativeDisplayDelegate::GetHDCPState( 113 void TestNativeDisplayDelegate::GetHDCPState(
114 const DisplaySnapshot& output, 114 const DisplaySnapshot& output,
115 const GetHDCPStateCallback& callback) { 115 const GetHDCPStateCallback& callback) {
116 callback.Run(get_hdcp_expectation_, hdcp_state_); 116 callback.Run(get_hdcp_expectation_, hdcp_state_);
117 } 117 }
118 118
119 void TestNativeDisplayDelegate::SetHDCPState( 119 void TestNativeDisplayDelegate::SetHDCPState(
120 const DisplaySnapshot& output, 120 const DisplaySnapshot& output,
(...skipping 25 matching lines...) Expand all
146 return true; 146 return true;
147 } 147 }
148 148
149 void TestNativeDisplayDelegate::AddObserver(NativeDisplayObserver* observer) { 149 void TestNativeDisplayDelegate::AddObserver(NativeDisplayObserver* observer) {
150 } 150 }
151 151
152 void TestNativeDisplayDelegate::RemoveObserver( 152 void TestNativeDisplayDelegate::RemoveObserver(
153 NativeDisplayObserver* observer) { 153 NativeDisplayObserver* observer) {
154 } 154 }
155 155
156 display::FakeDisplayController*
157 TestNativeDisplayDelegate::GetFakeDisplayController() {
158 return nullptr;
159 }
160
156 } // namespace test 161 } // namespace test
157 } // namespace ui 162 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/chromeos/test/test_native_display_delegate.h ('k') | ui/display/chromeos/x11/native_display_delegate_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698