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/display_configurator.h" | 5 #include "ui/display/chromeos/display_configurator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 query_content_protection_call_count_(0), | 135 query_content_protection_call_count_(0), |
136 callback_result_(CALLBACK_NOT_CALLED), | 136 callback_result_(CALLBACK_NOT_CALLED), |
137 display_control_result_(CALLBACK_NOT_CALLED) {} | 137 display_control_result_(CALLBACK_NOT_CALLED) {} |
138 ~DisplayConfiguratorTest() override {} | 138 ~DisplayConfiguratorTest() override {} |
139 | 139 |
140 void SetUp() override { | 140 void SetUp() override { |
141 log_.reset(new ActionLogger()); | 141 log_.reset(new ActionLogger()); |
142 | 142 |
143 native_display_delegate_ = new TestNativeDisplayDelegate(log_.get()); | 143 native_display_delegate_ = new TestNativeDisplayDelegate(log_.get()); |
144 configurator_.SetDelegateForTesting( | 144 configurator_.SetDelegateForTesting( |
145 scoped_ptr<NativeDisplayDelegate>(native_display_delegate_)); | 145 std::unique_ptr<NativeDisplayDelegate>(native_display_delegate_)); |
146 | 146 |
147 configurator_.set_state_controller(&state_controller_); | 147 configurator_.set_state_controller(&state_controller_); |
148 configurator_.set_mirroring_controller(&mirroring_controller_); | 148 configurator_.set_mirroring_controller(&mirroring_controller_); |
149 | 149 |
150 std::vector<const DisplayMode*> modes; | 150 std::vector<const DisplayMode*> modes; |
151 modes.push_back(&small_mode_); | 151 modes.push_back(&small_mode_); |
152 | 152 |
153 TestDisplaySnapshot* o = &outputs_[0]; | 153 TestDisplaySnapshot* o = &outputs_[0]; |
154 o->set_current_mode(&small_mode_); | 154 o->set_current_mode(&small_mode_); |
155 o->set_native_mode(&small_mode_); | 155 o->set_native_mode(&small_mode_); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 CallbackResult result = display_control_result_; | 238 CallbackResult result = display_control_result_; |
239 display_control_result_ = CALLBACK_NOT_CALLED; | 239 display_control_result_ = CALLBACK_NOT_CALLED; |
240 return result; | 240 return result; |
241 } | 241 } |
242 | 242 |
243 base::MessageLoop message_loop_; | 243 base::MessageLoop message_loop_; |
244 TestStateController state_controller_; | 244 TestStateController state_controller_; |
245 TestMirroringController mirroring_controller_; | 245 TestMirroringController mirroring_controller_; |
246 DisplayConfigurator configurator_; | 246 DisplayConfigurator configurator_; |
247 TestObserver observer_; | 247 TestObserver observer_; |
248 scoped_ptr<ActionLogger> log_; | 248 std::unique_ptr<ActionLogger> log_; |
249 TestNativeDisplayDelegate* native_display_delegate_; // not owned | 249 TestNativeDisplayDelegate* native_display_delegate_; // not owned |
250 DisplayConfigurator::TestApi test_api_; | 250 DisplayConfigurator::TestApi test_api_; |
251 | 251 |
252 bool enable_content_protection_status_; | 252 bool enable_content_protection_status_; |
253 int enable_content_protection_call_count_; | 253 int enable_content_protection_call_count_; |
254 DisplayConfigurator::QueryProtectionResponse | 254 DisplayConfigurator::QueryProtectionResponse |
255 query_content_protection_response_; | 255 query_content_protection_response_; |
256 int query_content_protection_call_count_; | 256 int query_content_protection_call_count_; |
257 | 257 |
258 TestDisplaySnapshot outputs_[2]; | 258 TestDisplaySnapshot outputs_[2]; |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 GetFramebufferAction(small_mode_.size(), &outputs_[0], | 1622 GetFramebufferAction(small_mode_.size(), &outputs_[0], |
1623 nullptr).c_str(), | 1623 nullptr).c_str(), |
1624 GetCrtcAction(outputs_[0], &small_mode_, | 1624 GetCrtcAction(outputs_[0], &small_mode_, |
1625 gfx::Point(0, 0)).c_str(), | 1625 gfx::Point(0, 0)).c_str(), |
1626 kUngrab, NULL), | 1626 kUngrab, NULL), |
1627 log_->GetActionsAndClear()); | 1627 log_->GetActionsAndClear()); |
1628 } | 1628 } |
1629 | 1629 |
1630 } // namespace test | 1630 } // namespace test |
1631 } // namespace ui | 1631 } // namespace ui |
OLD | NEW |