| 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_MULTI_DISPLAY_MANAGER_H_ | 5 #ifndef ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ |
| 6 #define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ | 6 #define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 void AddDisplayFromSpec(const std::string& spec); | 127 void AddDisplayFromSpec(const std::string& spec); |
| 128 | 128 |
| 129 // Set the 1st display as an internal display and returns the display Id for | 129 // Set the 1st display as an internal display and returns the display Id for |
| 130 // the internal display. | 130 // the internal display. |
| 131 int64 SetFirstDisplayAsInternalDisplayForTest(); | 131 int64 SetFirstDisplayAsInternalDisplayForTest(); |
| 132 | 132 |
| 133 // Checks if the mouse pointer is on one of displays, and moves to | 133 // Checks if the mouse pointer is on one of displays, and moves to |
| 134 // the center of the nearest display if it's outside of all displays. | 134 // the center of the nearest display if it's outside of all displays. |
| 135 void EnsurePointerInDisplays(); | 135 void EnsurePointerInDisplays(); |
| 136 | 136 |
| 137 // Updates |display_names_| by calling platform-dependent functions. | |
| 138 void RefreshDisplayNames(); | |
| 139 | |
| 140 // Update the display's id in the |display_list| to match the ones | 137 // Update the display's id in the |display_list| to match the ones |
| 141 // stored in this display manager's |displays_|. This is used to | 138 // stored in this display manager's |displays_|. This is used to |
| 142 // emulate display change behavior during the test byn creating the | 139 // emulate display change behavior during the test byn creating the |
| 143 // display list with the same display ids but with different bounds | 140 // display list with the same display ids but with different bounds |
| 144 void SetDisplayIdsForTest(DisplayList* display_list) const; | 141 void SetDisplayIdsForTest(DisplayList* display_list) const; |
| 145 | 142 |
| 146 DisplayList displays_; | 143 DisplayList displays_; |
| 147 | 144 |
| 148 int64 internal_display_id_; | 145 int64 internal_display_id_; |
| 149 | 146 |
| 150 // An internal display cache used when the internal display is disconnectd. | 147 // An internal display cache used when the internal display is disconnectd. |
| 151 scoped_ptr<gfx::Display> internal_display_; | 148 scoped_ptr<gfx::Display> internal_display_; |
| 152 | 149 |
| 153 bool force_bounds_changed_; | 150 bool force_bounds_changed_; |
| 154 | 151 |
| 155 // The mapping from the display ID to its overscan insets. | 152 // The mapping from the display ID to its overscan insets. |
| 156 std::map<int64, gfx::Insets> overscan_mapping_; | 153 std::map<int64, gfx::Insets> overscan_mapping_; |
| 157 | 154 |
| 158 // The cached display's name for the display ID. | |
| 159 std::map<int64, std::string> display_names_; | |
| 160 | |
| 161 DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager); | 155 DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager); |
| 162 }; | 156 }; |
| 163 | 157 |
| 164 extern const aura::WindowProperty<int64>* const kDisplayIdKey; | 158 extern const aura::WindowProperty<int64>* const kDisplayIdKey; |
| 165 | 159 |
| 166 } // namespace internal | 160 } // namespace internal |
| 167 } // namespace ash | 161 } // namespace ash |
| 168 | 162 |
| 169 #endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ | 163 #endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ |
| OLD | NEW |