| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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::VirtualDisplayController* |
| 157 TestNativeDisplayDelegate::GetVirtualDisplayController() { |
| 158 return nullptr; |
| 159 } |
| 160 |
| 156 } // namespace test | 161 } // namespace test |
| 157 } // namespace ui | 162 } // namespace ui |
| OLD | NEW |