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

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: Nits + Rebase 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // stored in this display manager's |displays_|. This is used to 180 // stored in this display manager's |displays_|. This is used to
183 // emulate display change behavior during the test byn creating the 181 // emulate display change behavior during the test byn creating the
184 // display list with the same display ids but with different bounds 182 // display list with the same display ids but with different bounds
185 void SetDisplayIdsForTest(DisplayList* display_list) const; 183 void SetDisplayIdsForTest(DisplayList* display_list) const;
186 184
187 // Forcibly specify 'has_overscan' flag of the DisplayInfo for specified |id|. 185 // Forcibly specify 'has_overscan' flag of the DisplayInfo for specified |id|.
188 void SetHasOverscanFlagForTest(int64 id, bool has_overscan); 186 void SetHasOverscanFlagForTest(int64 id, bool has_overscan);
189 187
190 DisplayList displays_; 188 DisplayList displays_;
191 189
192 int64 internal_display_id_;
193
194 // An internal display cache used when the internal display is disconnectd. 190 // An internal display cache used when the internal display is disconnectd.
195 scoped_ptr<gfx::Display> internal_display_; 191 scoped_ptr<gfx::Display> internal_display_;
196 192
197 bool force_bounds_changed_; 193 bool force_bounds_changed_;
198 194
199 // The mapping from the display ID to its internal data. 195 // The mapping from the display ID to its internal data.
200 std::map<int64, DisplayInfo> display_info_; 196 std::map<int64, DisplayInfo> display_info_;
201 197
202 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 198 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
203 }; 199 };
204 200
205 extern const aura::WindowProperty<int64>* const kDisplayIdKey; 201 extern const aura::WindowProperty<int64>* const kDisplayIdKey;
206 202
207 } // namespace internal 203 } // namespace internal
208 } // namespace ash 204 } // namespace ash
209 205
210 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ 206 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698