| 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_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
| 6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 template <typename T> class JSONValueConverter; | 31 template <typename T> class JSONValueConverter; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace gfx { | 34 namespace gfx { |
| 35 class Display; | 35 class Display; |
| 36 class Insets; | 36 class Insets; |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace ash { | 39 namespace ash { |
| 40 namespace internal { | 40 namespace internal { |
| 41 class CursorWindowController; |
| 41 class DisplayInfo; | 42 class DisplayInfo; |
| 42 class DisplayManager; | 43 class DisplayManager; |
| 43 class FocusActivationStore; | 44 class FocusActivationStore; |
| 44 class MirrorWindowController; | 45 class MirrorWindowController; |
| 45 class RootWindowController; | 46 class RootWindowController; |
| 46 class VirtualKeyboardWindowController; | 47 class VirtualKeyboardWindowController; |
| 47 } | 48 } |
| 48 | 49 |
| 49 // DisplayController owns and maintains RootWindows for each attached | 50 // DisplayController owns and maintains RootWindows for each attached |
| 50 // display, keeping them in sync with display configuration changes. | 51 // display, keeping them in sync with display configuration changes. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 69 DisplayController(); | 70 DisplayController(); |
| 70 virtual ~DisplayController(); | 71 virtual ~DisplayController(); |
| 71 | 72 |
| 72 void Start(); | 73 void Start(); |
| 73 void Shutdown(); | 74 void Shutdown(); |
| 74 | 75 |
| 75 // Returns primary display's ID. | 76 // Returns primary display's ID. |
| 76 // TODO(oshima): Move this out from DisplayController; | 77 // TODO(oshima): Move this out from DisplayController; |
| 77 static int64 GetPrimaryDisplayId(); | 78 static int64 GetPrimaryDisplayId(); |
| 78 | 79 |
| 80 internal::CursorWindowController* cursor_window_controller() { |
| 81 return cursor_window_controller_.get(); |
| 82 } |
| 83 |
| 79 internal::MirrorWindowController* mirror_window_controller() { | 84 internal::MirrorWindowController* mirror_window_controller() { |
| 80 return mirror_window_controller_.get(); | 85 return mirror_window_controller_.get(); |
| 81 } | 86 } |
| 82 | 87 |
| 83 internal::VirtualKeyboardWindowController* | 88 internal::VirtualKeyboardWindowController* |
| 84 virtual_keyboard_window_controller() { | 89 virtual_keyboard_window_controller() { |
| 85 return virtual_keyboard_window_controller_.get(); | 90 return virtual_keyboard_window_controller_.get(); |
| 86 } | 91 } |
| 87 | 92 |
| 88 // Initializes primary display. | 93 // Initializes primary display. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 100 | 105 |
| 101 // Returns the root window for |display_id|. | 106 // Returns the root window for |display_id|. |
| 102 aura::Window* GetRootWindowForDisplayId(int64 id); | 107 aura::Window* GetRootWindowForDisplayId(int64 id); |
| 103 | 108 |
| 104 // Toggle mirror mode. | 109 // Toggle mirror mode. |
| 105 void ToggleMirrorMode(); | 110 void ToggleMirrorMode(); |
| 106 | 111 |
| 107 // Swap primary and secondary display. | 112 // Swap primary and secondary display. |
| 108 void SwapPrimaryDisplay(); | 113 void SwapPrimaryDisplay(); |
| 109 | 114 |
| 115 // Enable composited cursor. The cursor is drawn in the given container. |
| 116 void EnableCompositedCursor(aura::Window* container); |
| 117 |
| 110 // Sets the ID of the primary display. If the display is not connected, it | 118 // Sets the ID of the primary display. If the display is not connected, it |
| 111 // will switch the primary display when connected. | 119 // will switch the primary display when connected. |
| 112 void SetPrimaryDisplayId(int64 id); | 120 void SetPrimaryDisplayId(int64 id); |
| 113 | 121 |
| 114 // Sets primary display. This re-assigns the current root | 122 // Sets primary display. This re-assigns the current root |
| 115 // window to given |display|. | 123 // window to given |display|. |
| 116 void SetPrimaryDisplay(const gfx::Display& display); | 124 void SetPrimaryDisplay(const gfx::Display& display); |
| 117 | 125 |
| 118 // Closes all child windows in the all root windows. | 126 // Closes all child windows in the all root windows. |
| 119 void CloseChildWindows(); | 127 void CloseChildWindows(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 std::map<int64, aura::Window*> root_windows_; | 200 std::map<int64, aura::Window*> root_windows_; |
| 193 | 201 |
| 194 ObserverList<Observer> observers_; | 202 ObserverList<Observer> observers_; |
| 195 | 203 |
| 196 // Store the primary root window temporarily while replacing | 204 // Store the primary root window temporarily while replacing |
| 197 // display. | 205 // display. |
| 198 aura::Window* primary_root_window_for_replace_; | 206 aura::Window* primary_root_window_for_replace_; |
| 199 | 207 |
| 200 scoped_ptr<internal::FocusActivationStore> focus_activation_store_; | 208 scoped_ptr<internal::FocusActivationStore> focus_activation_store_; |
| 201 | 209 |
| 210 scoped_ptr<internal::CursorWindowController> cursor_window_controller_; |
| 202 scoped_ptr<internal::MirrorWindowController> mirror_window_controller_; | 211 scoped_ptr<internal::MirrorWindowController> mirror_window_controller_; |
| 203 scoped_ptr<internal::VirtualKeyboardWindowController> | 212 scoped_ptr<internal::VirtualKeyboardWindowController> |
| 204 virtual_keyboard_window_controller_; | 213 virtual_keyboard_window_controller_; |
| 205 | 214 |
| 206 // Stores the curent cursor location (in native coordinates) used to | 215 // Stores the curent cursor location (in native coordinates) used to |
| 207 // restore the cursor location when display configuration | 216 // restore the cursor location when display configuration |
| 208 // changed. | 217 // changed. |
| 209 gfx::Point cursor_location_in_native_coords_for_restore_; | 218 gfx::Point cursor_location_in_native_coords_for_restore_; |
| 210 | 219 |
| 211 DISALLOW_COPY_AND_ASSIGN(DisplayController); | 220 DISALLOW_COPY_AND_ASSIGN(DisplayController); |
| 212 }; | 221 }; |
| 213 | 222 |
| 214 } // namespace ash | 223 } // namespace ash |
| 215 | 224 |
| 216 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 225 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
| OLD | NEW |