OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MANAGER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_ |
6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ | 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // How the second display will be used. | 71 // How the second display will be used. |
72 // 1) EXTENDED mode extends the desktop to the second dislpay. | 72 // 1) EXTENDED mode extends the desktop to the second dislpay. |
73 // 2) MIRRORING mode copies the content of the primary display to | 73 // 2) MIRRORING mode copies the content of the primary display to |
74 // the 2nd display. (Software Mirroring). | 74 // the 2nd display. (Software Mirroring). |
75 enum SecondDisplayMode { | 75 enum SecondDisplayMode { |
76 EXTENDED, | 76 EXTENDED, |
77 MIRRORING | 77 MIRRORING |
78 }; | 78 }; |
79 | 79 |
80 DisplayManager(); | 80 DisplayManager(); |
81 virtual ~DisplayManager(); | 81 ~DisplayManager() override; |
82 | 82 |
83 DisplayLayoutStore* layout_store() { | 83 DisplayLayoutStore* layout_store() { |
84 return layout_store_.get(); | 84 return layout_store_.get(); |
85 } | 85 } |
86 | 86 |
87 gfx::Screen* screen() { | 87 gfx::Screen* screen() { |
88 return screen_; | 88 return screen_; |
89 } | 89 } |
90 | 90 |
91 void set_delegate(Delegate* delegate) { delegate_ = delegate; } | 91 void set_delegate(Delegate* delegate) { delegate_ = delegate; } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // Change the mirror mode. | 263 // Change the mirror mode. |
264 void SetMirrorMode(bool mirrored); | 264 void SetMirrorMode(bool mirrored); |
265 | 265 |
266 // Used to emulate display change when run in a desktop environment instead | 266 // Used to emulate display change when run in a desktop environment instead |
267 // of on a device. | 267 // of on a device. |
268 void AddRemoveDisplay(); | 268 void AddRemoveDisplay(); |
269 void ToggleDisplayScaleFactor(); | 269 void ToggleDisplayScaleFactor(); |
270 | 270 |
271 // SoftwareMirroringController override: | 271 // SoftwareMirroringController override: |
272 #if defined(OS_CHROMEOS) | 272 #if defined(OS_CHROMEOS) |
273 virtual void SetSoftwareMirroring(bool enabled) override; | 273 void SetSoftwareMirroring(bool enabled) override; |
274 virtual bool SoftwareMirroringEnabled() const override; | 274 bool SoftwareMirroringEnabled() const override; |
275 #endif | 275 #endif |
276 bool software_mirroring_enabled() const { | 276 bool software_mirroring_enabled() const { |
277 return second_display_mode_ == MIRRORING; | 277 return second_display_mode_ == MIRRORING; |
278 }; | 278 }; |
279 | 279 |
280 // Sets/gets second display mode. | 280 // Sets/gets second display mode. |
281 void SetSecondDisplayMode(SecondDisplayMode mode); | 281 void SetSecondDisplayMode(SecondDisplayMode mode); |
282 SecondDisplayMode second_display_mode() const { | 282 SecondDisplayMode second_display_mode() const { |
283 return second_display_mode_; | 283 return second_display_mode_; |
284 } | 284 } |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 gfx::Display::Rotation registered_internal_display_rotation_; | 396 gfx::Display::Rotation registered_internal_display_rotation_; |
397 | 397 |
398 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; | 398 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; |
399 | 399 |
400 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 400 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
401 }; | 401 }; |
402 | 402 |
403 } // namespace ash | 403 } // namespace ash |
404 | 404 |
405 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 405 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
OLD | NEW |