| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 typedef std::vector<gfx::Display> DisplayList; | 78 typedef std::vector<gfx::Display> DisplayList; |
| 79 | 79 |
| 80 // How the second display will be used. | 80 // How the second display will be used. |
| 81 // 1) EXTENDED mode extends the desktop to the second dislpay. | 81 // 1) EXTENDED mode extends the desktop to the second dislpay. |
| 82 // 2) MIRRORING mode copies the content of the primary display to | 82 // 2) MIRRORING mode copies the content of the primary display to |
| 83 // the 2nd display. (Software Mirroring). | 83 // the 2nd display. (Software Mirroring). |
| 84 // 3) UNIFIED mode creates single desktop across multiple displays. | 84 // 3) UNIFIED mode creates single desktop across multiple displays. |
| 85 enum MultiDisplayMode { | 85 enum MultiDisplayMode { |
| 86 EXTENDED, | 86 EXTENDED = 0, |
| 87 MIRRORING, | 87 MIRRORING, |
| 88 UNIFIED, | 88 UNIFIED, |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 // The display ID for a virtual display assigned to a unified desktop. | 91 // The display ID for a virtual display assigned to a unified desktop. |
| 92 static int64 kUnifiedDisplayId; | 92 static int64 kUnifiedDisplayId; |
| 93 | 93 |
| 94 DisplayManager(); | 94 DisplayManager(); |
| 95 #if defined(OS_CHROMEOS) | 95 #if defined(OS_CHROMEOS) |
| 96 ~DisplayManager() override; | 96 ~DisplayManager() override; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 // Sets/gets multi display mode. | 291 // Sets/gets multi display mode. |
| 292 void SetMultiDisplayMode(MultiDisplayMode mode); | 292 void SetMultiDisplayMode(MultiDisplayMode mode); |
| 293 | 293 |
| 294 // Sets/gets default multi display mode. | 294 // Sets/gets default multi display mode. |
| 295 void SetDefaultMultiDisplayMode(MultiDisplayMode mode); | 295 void SetDefaultMultiDisplayMode(MultiDisplayMode mode); |
| 296 MultiDisplayMode default_multi_display_mode() const { | 296 MultiDisplayMode default_multi_display_mode() const { |
| 297 return default_multi_display_mode_; | 297 return default_multi_display_mode_; |
| 298 } | 298 } |
| 299 | 299 |
| 300 // Reconfigure display configuration using the same |
| 301 // physical display. TODO(oshima): Refactor and move this |
| 302 // impl to |SetDefaultMultiDisplayMode|. |
| 303 void ReconfigureDisplays(); |
| 304 |
| 300 // Update the bounds of the display given by |display_id|. | 305 // Update the bounds of the display given by |display_id|. |
| 301 bool UpdateDisplayBounds(int64 display_id, | 306 bool UpdateDisplayBounds(int64 display_id, |
| 302 const gfx::Rect& new_bounds); | 307 const gfx::Rect& new_bounds); |
| 303 | 308 |
| 304 // Creates mirror window asynchronously if the software mirror mode | 309 // Creates mirror window asynchronously if the software mirror mode |
| 305 // is enabled. | 310 // is enabled. |
| 306 void CreateMirrorWindowAsyncIfAny(); | 311 void CreateMirrorWindowAsyncIfAny(); |
| 307 | 312 |
| 308 // Creates a MouseWarpController for the current display | 313 // Creates a MouseWarpController for the current display |
| 309 // configuration. |drag_source| is the window where dragging | 314 // configuration. |drag_source| is the window where dragging |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 gfx::Display::Rotation registered_internal_display_rotation_; | 429 gfx::Display::Rotation registered_internal_display_rotation_; |
| 425 | 430 |
| 426 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; | 431 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; |
| 427 | 432 |
| 428 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 433 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 429 }; | 434 }; |
| 430 | 435 |
| 431 } // namespace ash | 436 } // namespace ash |
| 432 | 437 |
| 433 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 438 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| OLD | NEW |