| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip); | 137 void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip); |
| 138 | 138 |
| 139 // Checks if the mouse pointer is on one of displays, and moves to | 139 // Checks if the mouse pointer is on one of displays, and moves to |
| 140 // the center of the nearest display if it's outside of all displays. | 140 // the center of the nearest display if it's outside of all displays. |
| 141 void EnsurePointerInDisplays(); | 141 void EnsurePointerInDisplays(); |
| 142 | 142 |
| 143 // Sets the work area's |insets| to the display assigned to |window|. | 143 // Sets the work area's |insets| to the display assigned to |window|. |
| 144 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window, | 144 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window, |
| 145 const gfx::Insets& insets); | 145 const gfx::Insets& insets); |
| 146 // gfx::DisplayObserver overrides: | 146 // gfx::DisplayObserver overrides: |
| 147 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; | 147 virtual void OnDisplayAdded(const gfx::Display& display) override; |
| 148 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; | 148 virtual void OnDisplayRemoved(const gfx::Display& display) override; |
| 149 virtual void OnDisplayMetricsChanged(const gfx::Display& display, | 149 virtual void OnDisplayMetricsChanged(const gfx::Display& display, |
| 150 uint32_t metrics) OVERRIDE; | 150 uint32_t metrics) override; |
| 151 | 151 |
| 152 // aura::WindowTreeHostObserver overrides: | 152 // aura::WindowTreeHostObserver overrides: |
| 153 virtual void OnHostResized(const aura::WindowTreeHost* host) OVERRIDE; | 153 virtual void OnHostResized(const aura::WindowTreeHost* host) override; |
| 154 | 154 |
| 155 // aura::DisplayManager::Delegate overrides: | 155 // aura::DisplayManager::Delegate overrides: |
| 156 virtual void CreateOrUpdateNonDesktopDisplay(const DisplayInfo& info) | 156 virtual void CreateOrUpdateNonDesktopDisplay(const DisplayInfo& info) |
| 157 OVERRIDE; | 157 override; |
| 158 virtual void CloseNonDesktopDisplay() OVERRIDE; | 158 virtual void CloseNonDesktopDisplay() override; |
| 159 virtual void PreDisplayConfigurationChange(bool clear_focus) OVERRIDE; | 159 virtual void PreDisplayConfigurationChange(bool clear_focus) override; |
| 160 virtual void PostDisplayConfigurationChange() OVERRIDE; | 160 virtual void PostDisplayConfigurationChange() override; |
| 161 | 161 |
| 162 private: | 162 private: |
| 163 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated); | 163 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated); |
| 164 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout); | 164 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout); |
| 165 friend class DisplayManager; | 165 friend class DisplayManager; |
| 166 friend class MirrorWindowController; | 166 friend class MirrorWindowController; |
| 167 | 167 |
| 168 // Creates a WindowTreeHost for |display| and stores it in the | 168 // Creates a WindowTreeHost for |display| and stores it in the |
| 169 // |window_tree_hosts_| map. | 169 // |window_tree_hosts_| map. |
| 170 AshWindowTreeHost* AddWindowTreeHostForDisplay( | 170 AshWindowTreeHost* AddWindowTreeHostForDisplay( |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 gfx::Point cursor_location_in_native_coords_for_restore_; | 218 gfx::Point cursor_location_in_native_coords_for_restore_; |
| 219 | 219 |
| 220 base::WeakPtrFactory<DisplayController> weak_ptr_factory_; | 220 base::WeakPtrFactory<DisplayController> weak_ptr_factory_; |
| 221 | 221 |
| 222 DISALLOW_COPY_AND_ASSIGN(DisplayController); | 222 DISALLOW_COPY_AND_ASSIGN(DisplayController); |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace ash | 225 } // namespace ash |
| 226 | 226 |
| 227 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 227 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
| OLD | NEW |