| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef ASH_DISPLAY_DISPLAY_CONFIGURATION_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_CONFIGURATION_CONTROLLER_H_ |
| 6 #define ASH_DISPLAY_DISPLAY_CONFIGURATION_CONTROLLER_H_ | 6 #define ASH_DISPLAY_DISPLAY_CONFIGURATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/display/window_tree_host_manager.h" | 11 #include "ash/display/window_tree_host_manager.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "ui/gfx/display.h" | 14 #include "ui/display/display.h" |
| 15 | 15 |
| 16 namespace display { | 16 namespace display { |
| 17 class DisplayLayout; | 17 class DisplayLayout; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace ash { | 20 namespace ash { |
| 21 | 21 |
| 22 namespace test { | 22 namespace test { |
| 23 class ShellTestApi; | 23 class ShellTestApi; |
| 24 } // namespace test | 24 } // namespace test |
| (...skipping 19 matching lines...) Expand all Loading... |
| 44 // display. TODO(oshima/stevenjb): Support 3+ displays. | 44 // display. TODO(oshima/stevenjb): Support 3+ displays. |
| 45 void SetDisplayLayout(std::unique_ptr<display::DisplayLayout> layout, | 45 void SetDisplayLayout(std::unique_ptr<display::DisplayLayout> layout, |
| 46 bool user_action); | 46 bool user_action); |
| 47 | 47 |
| 48 // Sets the mirror mode with a fade-in/fade-out animation. Affects all | 48 // Sets the mirror mode with a fade-in/fade-out animation. Affects all |
| 49 // displays. | 49 // displays. |
| 50 void SetMirrorMode(bool mirror, bool user_action); | 50 void SetMirrorMode(bool mirror, bool user_action); |
| 51 | 51 |
| 52 // Sets the display's rotation with animation if available. | 52 // Sets the display's rotation with animation if available. |
| 53 void SetDisplayRotation(int64_t display_id, | 53 void SetDisplayRotation(int64_t display_id, |
| 54 gfx::Display::Rotation rotation, | 54 display::Display::Rotation rotation, |
| 55 gfx::Display::RotationSource source, | 55 display::Display::RotationSource source, |
| 56 bool user_action); | 56 bool user_action); |
| 57 | 57 |
| 58 // Sets the primary display id. | 58 // Sets the primary display id. |
| 59 void SetPrimaryDisplayId(int64_t display_id, bool user_action); | 59 void SetPrimaryDisplayId(int64_t display_id, bool user_action); |
| 60 | 60 |
| 61 // WindowTreeHostManager::Observer | 61 // WindowTreeHostManager::Observer |
| 62 void OnDisplayConfigurationChanged() override; | 62 void OnDisplayConfigurationChanged() override; |
| 63 | 63 |
| 64 protected: | 64 protected: |
| 65 friend class ash::test::ShellTestApi; | 65 friend class ash::test::ShellTestApi; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 84 std::unique_ptr<DisplayChangeLimiter> limiter_; | 84 std::unique_ptr<DisplayChangeLimiter> limiter_; |
| 85 | 85 |
| 86 base::WeakPtrFactory<DisplayConfigurationController> weak_ptr_factory_; | 86 base::WeakPtrFactory<DisplayConfigurationController> weak_ptr_factory_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurationController); | 88 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurationController); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace ash | 91 } // namespace ash |
| 92 | 92 |
| 93 #endif // ASH_DISPLAY_DISPLAY_CONFIGURATION_CONTROLLER_H_ | 93 #endif // ASH_DISPLAY_DISPLAY_CONFIGURATION_CONTROLLER_H_ |
| OLD | NEW |