Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: ash/display/display_manager.h

Issue 12217120: Add IsInternal property to gfx::Display (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Get rid of static initializer Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/display/display_controller.cc ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 // True if the given |display| is currently connected. 54 // True if the given |display| is currently connected.
55 bool IsActiveDisplay(const gfx::Display& display) const; 55 bool IsActiveDisplay(const gfx::Display& display) const;
56 56
57 // True if there is an internal display. 57 // True if there is an internal display.
58 bool HasInternalDisplay() const; 58 bool HasInternalDisplay() const;
59 59
60 bool IsInternalDisplayId(int64 id) const; 60 bool IsInternalDisplayId(int64 id) const;
61 61
62 uint64 internal_display_id() const { return internal_display_id_; }
63
64 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window, 62 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window,
65 const gfx::Insets& insets); 63 const gfx::Insets& insets);
66 64
67 // Returns display for given |id|; 65 // Returns display for given |id|;
68 const gfx::Display& GetDisplayForId(int64 id) const; 66 const gfx::Display& GetDisplayForId(int64 id) const;
69 67
70 // Finds the display that contains |point| in screeen coordinates. 68 // Finds the display that contains |point| in screeen coordinates.
71 // Returns invalid display if there is no display that can satisfy 69 // Returns invalid display if there is no display that can satisfy
72 // the condition. 70 // the condition.
73 const gfx::Display& FindDisplayContainingPoint( 71 const gfx::Display& FindDisplayContainingPoint(
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // stored in this display manager's |displays_|. This is used to 179 // stored in this display manager's |displays_|. This is used to
182 // emulate display change behavior during the test byn creating the 180 // emulate display change behavior during the test byn creating the
183 // display list with the same display ids but with different bounds 181 // display list with the same display ids but with different bounds
184 void SetDisplayIdsForTest(DisplayList* display_list) const; 182 void SetDisplayIdsForTest(DisplayList* display_list) const;
185 183
186 // Forcibly specify 'has_overscan' flag of the DisplayInfo for specified |id|. 184 // Forcibly specify 'has_overscan' flag of the DisplayInfo for specified |id|.
187 void SetHasOverscanFlagForTest(int64 id, bool has_overscan); 185 void SetHasOverscanFlagForTest(int64 id, bool has_overscan);
188 186
189 DisplayList displays_; 187 DisplayList displays_;
190 188
191 int64 internal_display_id_;
192
193 // An internal display cache used when the internal display is disconnectd. 189 // An internal display cache used when the internal display is disconnectd.
194 scoped_ptr<gfx::Display> internal_display_; 190 scoped_ptr<gfx::Display> internal_display_;
195 191
196 bool force_bounds_changed_; 192 bool force_bounds_changed_;
197 193
198 // The mapping from the display ID to its internal data. 194 // The mapping from the display ID to its internal data.
199 std::map<int64, DisplayInfo> display_info_; 195 std::map<int64, DisplayInfo> display_info_;
200 196
201 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 197 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
202 }; 198 };
203 199
204 // Creates a display from string spec. 100+200-1440x800 creates display 200 // Creates a display from string spec. 100+200-1440x800 creates display
205 // whose size is 1440x800 at the location (100, 200) in screen's coordinates. 201 // whose size is 1440x800 at the location (100, 200) in screen's coordinates.
206 // The location can be omitted and be just "1440x800", which creates 202 // The location can be omitted and be just "1440x800", which creates
207 // display at the origin of the screen. An empty string creates 203 // display at the origin of the screen. An empty string creates
208 // the display with default size. 204 // the display with default size.
209 // The device scale factor can be specified by "*", like "1280x780*2", 205 // The device scale factor can be specified by "*", like "1280x780*2",
210 // or will use the value of |gfx::Display::GetForcedDeviceScaleFactor()| if 206 // or will use the value of |gfx::Display::GetForcedDeviceScaleFactor()| if
211 // --force-device-scale-factor is specified. 207 // --force-device-scale-factor is specified.
212 ASH_EXPORT gfx::Display CreateDisplayFromSpec(const std::string& str); 208 ASH_EXPORT gfx::Display CreateDisplayFromSpec(const std::string& str);
213 209
214 extern const aura::WindowProperty<int64>* const kDisplayIdKey; 210 extern const aura::WindowProperty<int64>* const kDisplayIdKey;
215 211
216 } // namespace internal 212 } // namespace internal
217 } // namespace ash 213 } // namespace ash
218 214
219 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ 215 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/display/display_controller.cc ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698