| 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 class AshWindowTreeHost; | 40 class AshWindowTreeHost; |
| 41 struct AshWindowTreeHostInitParams; |
| 41 class CursorWindowController; | 42 class CursorWindowController; |
| 42 class DisplayInfo; | 43 class DisplayInfo; |
| 43 class DisplayManager; | 44 class DisplayManager; |
| 44 class FocusActivationStore; | 45 class FocusActivationStore; |
| 45 class MirrorWindowController; | 46 class MirrorWindowController; |
| 46 class RootWindowController; | 47 class RootWindowController; |
| 47 class VirtualKeyboardWindowController; | 48 class VirtualKeyboardWindowController; |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 86 } |
| 86 | 87 |
| 87 MirrorWindowController* mirror_window_controller() { | 88 MirrorWindowController* mirror_window_controller() { |
| 88 return mirror_window_controller_.get(); | 89 return mirror_window_controller_.get(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 VirtualKeyboardWindowController* virtual_keyboard_window_controller() { | 92 VirtualKeyboardWindowController* virtual_keyboard_window_controller() { |
| 92 return virtual_keyboard_window_controller_.get(); | 93 return virtual_keyboard_window_controller_.get(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 // Create a WindowTreeHost for the primary display. | 96 // Create a WindowTreeHost for the primary display. This replaces |
| 96 void CreatePrimaryHost(); | 97 // |initial_bounds| in |init_params|. |
| 98 void CreatePrimaryHost(const AshWindowTreeHostInitParams& init_params); |
| 97 | 99 |
| 98 // Initializes all displays. | 100 // Initializes all displays. |
| 99 void InitDisplays(); | 101 void InitDisplays(); |
| 100 | 102 |
| 101 // Add/Remove observers. | 103 // Add/Remove observers. |
| 102 void AddObserver(Observer* observer); | 104 void AddObserver(Observer* observer); |
| 103 void RemoveObserver(Observer* observer); | 105 void RemoveObserver(Observer* observer); |
| 104 | 106 |
| 105 // Returns the root window for primary display. | 107 // Returns the root window for primary display. |
| 106 aura::Window* GetPrimaryRootWindow(); | 108 aura::Window* GetPrimaryRootWindow(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 virtual void PostDisplayConfigurationChange() OVERRIDE; | 164 virtual void PostDisplayConfigurationChange() OVERRIDE; |
| 163 | 165 |
| 164 private: | 166 private: |
| 165 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated); | 167 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated); |
| 166 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout); | 168 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout); |
| 167 friend class DisplayManager; | 169 friend class DisplayManager; |
| 168 friend class MirrorWindowController; | 170 friend class MirrorWindowController; |
| 169 | 171 |
| 170 // Creates a WindowTreeHost for |display| and stores it in the | 172 // Creates a WindowTreeHost for |display| and stores it in the |
| 171 // |window_tree_hosts_| map. | 173 // |window_tree_hosts_| map. |
| 172 AshWindowTreeHost* AddWindowTreeHostForDisplay(const gfx::Display& display); | 174 AshWindowTreeHost* AddWindowTreeHostForDisplay( |
| 175 const gfx::Display& display, |
| 176 const AshWindowTreeHostInitParams& params); |
| 173 | 177 |
| 174 void OnFadeOutForSwapDisplayFinished(); | 178 void OnFadeOutForSwapDisplayFinished(); |
| 175 | 179 |
| 176 void UpdateHostWindowNames(); | 180 void UpdateHostWindowNames(); |
| 177 | 181 |
| 178 class DisplayChangeLimiter { | 182 class DisplayChangeLimiter { |
| 179 public: | 183 public: |
| 180 DisplayChangeLimiter(); | 184 DisplayChangeLimiter(); |
| 181 | 185 |
| 182 // Sets how long the throttling should last. | 186 // Sets how long the throttling should last. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // restore the cursor location when display configuration | 220 // restore the cursor location when display configuration |
| 217 // changed. | 221 // changed. |
| 218 gfx::Point cursor_location_in_native_coords_for_restore_; | 222 gfx::Point cursor_location_in_native_coords_for_restore_; |
| 219 | 223 |
| 220 DISALLOW_COPY_AND_ASSIGN(DisplayController); | 224 DISALLOW_COPY_AND_ASSIGN(DisplayController); |
| 221 }; | 225 }; |
| 222 | 226 |
| 223 } // namespace ash | 227 } // namespace ash |
| 224 | 228 |
| 225 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 229 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
| OLD | NEW |