| 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 #if defined(OS_CHROMEOS) |
| 82 ~DisplayManager() override; |
| 83 #else |
| 81 virtual ~DisplayManager(); | 84 virtual ~DisplayManager(); |
| 85 #endif |
| 82 | 86 |
| 83 DisplayLayoutStore* layout_store() { | 87 DisplayLayoutStore* layout_store() { |
| 84 return layout_store_.get(); | 88 return layout_store_.get(); |
| 85 } | 89 } |
| 86 | 90 |
| 87 gfx::Screen* screen() { | 91 gfx::Screen* screen() { |
| 88 return screen_; | 92 return screen_; |
| 89 } | 93 } |
| 90 | 94 |
| 91 void set_delegate(Delegate* delegate) { delegate_ = delegate; } | 95 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. | 267 // Change the mirror mode. |
| 264 void SetMirrorMode(bool mirrored); | 268 void SetMirrorMode(bool mirrored); |
| 265 | 269 |
| 266 // Used to emulate display change when run in a desktop environment instead | 270 // Used to emulate display change when run in a desktop environment instead |
| 267 // of on a device. | 271 // of on a device. |
| 268 void AddRemoveDisplay(); | 272 void AddRemoveDisplay(); |
| 269 void ToggleDisplayScaleFactor(); | 273 void ToggleDisplayScaleFactor(); |
| 270 | 274 |
| 271 // SoftwareMirroringController override: | 275 // SoftwareMirroringController override: |
| 272 #if defined(OS_CHROMEOS) | 276 #if defined(OS_CHROMEOS) |
| 273 virtual void SetSoftwareMirroring(bool enabled) override; | 277 void SetSoftwareMirroring(bool enabled) override; |
| 274 virtual bool SoftwareMirroringEnabled() const override; | 278 bool SoftwareMirroringEnabled() const override; |
| 275 #endif | 279 #endif |
| 276 bool software_mirroring_enabled() const { | 280 bool software_mirroring_enabled() const { |
| 277 return second_display_mode_ == MIRRORING; | 281 return second_display_mode_ == MIRRORING; |
| 278 }; | 282 }; |
| 279 | 283 |
| 280 // Sets/gets second display mode. | 284 // Sets/gets second display mode. |
| 281 void SetSecondDisplayMode(SecondDisplayMode mode); | 285 void SetSecondDisplayMode(SecondDisplayMode mode); |
| 282 SecondDisplayMode second_display_mode() const { | 286 SecondDisplayMode second_display_mode() const { |
| 283 return second_display_mode_; | 287 return second_display_mode_; |
| 284 } | 288 } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 gfx::Display::Rotation registered_internal_display_rotation_; | 400 gfx::Display::Rotation registered_internal_display_rotation_; |
| 397 | 401 |
| 398 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; | 402 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; |
| 399 | 403 |
| 400 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 404 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 401 }; | 405 }; |
| 402 | 406 |
| 403 } // namespace ash | 407 } // namespace ash |
| 404 | 408 |
| 405 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 409 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| OLD | NEW |