| 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 "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/display/chromeos/test/action_logger_util.h" | 10 #include "ui/display/chromeos/test/action_logger_util.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 // DisplayConfigurator::Observer overrides: | 44 // DisplayConfigurator::Observer overrides: |
| 45 void OnDisplayModeChanged( | 45 void OnDisplayModeChanged( |
| 46 const DisplayConfigurator::DisplayStateList& outputs) override { | 46 const DisplayConfigurator::DisplayStateList& outputs) override { |
| 47 num_changes_++; | 47 num_changes_++; |
| 48 latest_outputs_ = outputs; | 48 latest_outputs_ = outputs; |
| 49 } | 49 } |
| 50 | 50 |
| 51 void OnDisplayModeChangeFailed( | 51 void OnDisplayModeChangeFailed( |
| 52 const DisplayConfigurator::DisplayStateList& outputs, |
| 52 MultipleDisplayState failed_new_state) override { | 53 MultipleDisplayState failed_new_state) override { |
| 53 num_failures_++; | 54 num_failures_++; |
| 54 latest_failed_state_ = failed_new_state; | 55 latest_failed_state_ = failed_new_state; |
| 55 } | 56 } |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 DisplayConfigurator* configurator_; // Not owned. | 59 DisplayConfigurator* configurator_; // Not owned. |
| 59 | 60 |
| 60 // Number of times that OnDisplayMode*() has been called. | 61 // Number of times that OnDisplayMode*() has been called. |
| 61 int num_changes_; | 62 int num_changes_; |
| (...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 GetFramebufferAction(small_mode_.size(), &outputs_[0], | 1348 GetFramebufferAction(small_mode_.size(), &outputs_[0], |
| 1348 nullptr).c_str(), | 1349 nullptr).c_str(), |
| 1349 GetCrtcAction(outputs_[0], &small_mode_, | 1350 GetCrtcAction(outputs_[0], &small_mode_, |
| 1350 gfx::Point(0, 0)).c_str(), | 1351 gfx::Point(0, 0)).c_str(), |
| 1351 kUngrab, NULL), | 1352 kUngrab, NULL), |
| 1352 log_->GetActionsAndClear()); | 1353 log_->GetActionsAndClear()); |
| 1353 } | 1354 } |
| 1354 | 1355 |
| 1355 } // namespace test | 1356 } // namespace test |
| 1356 } // namespace ui | 1357 } // namespace ui |
| OLD | NEW |