| 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/update_display_configuration_task.h" |
| 6 |
| 5 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> |
| 6 | 9 |
| 7 #include "base/bind.h" | 10 #include "base/bind.h" |
| 8 #include "base/macros.h" | 11 #include "base/macros.h" |
| 9 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/display/chromeos/display_layout_manager.h" | 15 #include "ui/display/chromeos/display_layout_manager.h" |
| 13 #include "ui/display/chromeos/test/action_logger_util.h" | 16 #include "ui/display/chromeos/test/action_logger_util.h" |
| 14 #include "ui/display/chromeos/test/test_display_snapshot.h" | 17 #include "ui/display/chromeos/test/test_display_snapshot.h" |
| 15 #include "ui/display/chromeos/test/test_native_display_delegate.h" | 18 #include "ui/display/chromeos/test/test_native_display_delegate.h" |
| 16 #include "ui/display/chromeos/update_display_configuration_task.h" | |
| 17 | 19 |
| 18 namespace ui { | 20 namespace ui { |
| 19 namespace test { | 21 namespace test { |
| 20 | 22 |
| 21 namespace { | 23 namespace { |
| 22 | 24 |
| 23 class TestSoftwareMirroringController | 25 class TestSoftwareMirroringController |
| 24 : public DisplayConfigurator::SoftwareMirroringController { | 26 : public DisplayConfigurator::SoftwareMirroringController { |
| 25 public: | 27 public: |
| 26 TestSoftwareMirroringController() : is_enabled_(false) {} | 28 TestSoftwareMirroringController() : is_enabled_(false) {} |
| (...skipping 21 matching lines...) Expand all Loading... |
| 48 | 50 |
| 49 void set_display_state(MultipleDisplayState state) { display_state_ = state; } | 51 void set_display_state(MultipleDisplayState state) { display_state_ = state; } |
| 50 | 52 |
| 51 void set_power_state(chromeos::DisplayPowerState state) { | 53 void set_power_state(chromeos::DisplayPowerState state) { |
| 52 power_state_ = state; | 54 power_state_ = state; |
| 53 } | 55 } |
| 54 | 56 |
| 55 void set_software_mirroring_controller( | 57 void set_software_mirroring_controller( |
| 56 scoped_ptr<DisplayConfigurator::SoftwareMirroringController> | 58 scoped_ptr<DisplayConfigurator::SoftwareMirroringController> |
| 57 software_mirroring_controller) { | 59 software_mirroring_controller) { |
| 58 software_mirroring_controller_ = software_mirroring_controller.Pass(); | 60 software_mirroring_controller_ = std::move(software_mirroring_controller); |
| 59 } | 61 } |
| 60 | 62 |
| 61 // DisplayConfigurator::DisplayLayoutManager: | 63 // DisplayConfigurator::DisplayLayoutManager: |
| 62 DisplayConfigurator::SoftwareMirroringController* | 64 DisplayConfigurator::SoftwareMirroringController* |
| 63 GetSoftwareMirroringController() const override { | 65 GetSoftwareMirroringController() const override { |
| 64 return software_mirroring_controller_.get(); | 66 return software_mirroring_controller_.get(); |
| 65 } | 67 } |
| 66 | 68 |
| 67 DisplayConfigurator::StateController* GetStateController() const override { | 69 DisplayConfigurator::StateController* GetStateController() const override { |
| 68 return nullptr; | 70 return nullptr; |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 &displays_[0], &displays_[1]).c_str(), | 473 &displays_[0], &displays_[1]).c_str(), |
| 472 GetCrtcAction(displays_[0], &small_mode_, gfx::Point()).c_str(), | 474 GetCrtcAction(displays_[0], &small_mode_, gfx::Point()).c_str(), |
| 473 GetCrtcAction(displays_[1], &big_mode_, | 475 GetCrtcAction(displays_[1], &big_mode_, |
| 474 gfx::Point(0, small_mode_.size().height())).c_str(), | 476 gfx::Point(0, small_mode_.size().height())).c_str(), |
| 475 kUngrab, NULL), | 477 kUngrab, NULL), |
| 476 log_.GetActionsAndClear()); | 478 log_.GetActionsAndClear()); |
| 477 } | 479 } |
| 478 | 480 |
| 479 } // namespace test | 481 } // namespace test |
| 480 } // namespace ui | 482 } // namespace ui |
| OLD | NEW |