| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Returns the logical number of displays. This returns 1 | 136 // Returns the logical number of displays. This returns 1 |
| 137 // when displays are mirrored. | 137 // when displays are mirrored. |
| 138 size_t GetNumDisplays() const; | 138 size_t GetNumDisplays() const; |
| 139 | 139 |
| 140 // Returns the number of connected displays. This returns 2 | 140 // Returns the number of connected displays. This returns 2 |
| 141 // when displays are mirrored. | 141 // when displays are mirrored. |
| 142 size_t num_connected_displays() const { return num_connected_displays_; } | 142 size_t num_connected_displays() const { return num_connected_displays_; } |
| 143 | 143 |
| 144 // Returns the mirroring status. | 144 // Returns the mirroring status. |
| 145 bool IsMirrored() const; | 145 bool IsMirrored() const; |
| 146 int64 mirrored_display_id() const { return mirrored_display_.id(); } | 146 const gfx::Display& mirrored_display() const { return mirrored_display_; } |
| 147 | 147 |
| 148 // Returns the display object nearest given |window|. | 148 // Returns the display object nearest given |window|. |
| 149 const gfx::Display& GetDisplayNearestPoint( | 149 const gfx::Display& GetDisplayNearestPoint( |
| 150 const gfx::Point& point) const; | 150 const gfx::Point& point) const; |
| 151 | 151 |
| 152 // Returns the display object nearest given |point|. | 152 // Returns the display object nearest given |point|. |
| 153 const gfx::Display& GetDisplayNearestWindow( | 153 const gfx::Display& GetDisplayNearestWindow( |
| 154 const aura::Window* window) const; | 154 const aura::Window* window) const; |
| 155 | 155 |
| 156 // Returns the display that most closely intersects |match_rect|. | 156 // Returns the display that most closely intersects |match_rect|. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 void set_change_display_upon_host_resize(bool value) { | 204 void set_change_display_upon_host_resize(bool value) { |
| 205 change_display_upon_host_resize_ = value; | 205 change_display_upon_host_resize_ = value; |
| 206 } | 206 } |
| 207 | 207 |
| 208 void Init(); | 208 void Init(); |
| 209 | 209 |
| 210 gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root); | 210 gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root); |
| 211 gfx::Display& FindDisplayForId(int64 id); | 211 gfx::Display& FindDisplayForId(int64 id); |
| 212 | 212 |
| 213 // Add the mirror display's display info if the software based |
| 214 // mirroring is in use. |
| 215 void AddMirrorDisplayInfoIfAny(std::vector<DisplayInfo>* display_info_list); |
| 216 |
| 213 // Refer to |CreateDisplayFromSpec| API for the format of |spec|. | 217 // Refer to |CreateDisplayFromSpec| API for the format of |spec|. |
| 214 void AddDisplayFromSpec(const std::string& spec); | 218 void AddDisplayFromSpec(const std::string& spec); |
| 215 | 219 |
| 216 // Inserts and update the DisplayInfo according to the overscan | 220 // Inserts and update the DisplayInfo according to the overscan |
| 217 // state. Note that The DisplayInfo stored in the |internal_display_info_| | 221 // state. Note that The DisplayInfo stored in the |internal_display_info_| |
| 218 // can be different from |new_info| (due to overscan state), so | 222 // can be different from |new_info| (due to overscan state), so |
| 219 // you must use |GetDisplayInfo| to get the correct DisplayInfo for | 223 // you must use |GetDisplayInfo| to get the correct DisplayInfo for |
| 220 // a display. | 224 // a display. |
| 221 void InsertAndUpdateDisplayInfo(const DisplayInfo& new_info); | 225 void InsertAndUpdateDisplayInfo(const DisplayInfo& new_info); |
| 222 | 226 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 248 | 252 |
| 249 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 253 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 250 }; | 254 }; |
| 251 | 255 |
| 252 extern const aura::WindowProperty<int64>* const kDisplayIdKey; | 256 extern const aura::WindowProperty<int64>* const kDisplayIdKey; |
| 253 | 257 |
| 254 } // namespace internal | 258 } // namespace internal |
| 255 } // namespace ash | 259 } // namespace ash |
| 256 | 260 |
| 257 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 261 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| OLD | NEW |