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

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

Issue 13466022: Don't move cursor location when rotation /ui scaling has changed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add explicit bootstrap flag as display_controller is no longer NULL during bootstrap Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/display/display_controller.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_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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 // Returns the display layout used for current displays. 185 // Returns the display layout used for current displays.
186 DisplayLayout GetCurrentDisplayLayout() const; 186 DisplayLayout GetCurrentDisplayLayout() const;
187 187
188 // Returns the current display pair. 188 // Returns the current display pair.
189 DisplayIdPair GetCurrentDisplayIdPair() const; 189 DisplayIdPair GetCurrentDisplayIdPair() const;
190 190
191 // Returns the display layout registered for the given display id |pair|. 191 // Returns the display layout registered for the given display id |pair|.
192 DisplayLayout GetRegisteredDisplayLayout(const DisplayIdPair& pair) const; 192 DisplayLayout GetRegisteredDisplayLayout(const DisplayIdPair& pair) const;
193 193
194 // Checks if the mouse pointer is on one of displays, and moves to
195 // the center of the nearest display if it's outside of all displays.
196 void EnsurePointerInDisplays();
197
198 gfx::Point GetNativeMouseCursorLocation() const;
199
200 // Update the current cursor image that is sutable for the given
201 // |point_in_native|.
202 void UpdateMouseCursor(const gfx::Point& point_in_native);
203
194 // aura::DisplayObserver overrides: 204 // aura::DisplayObserver overrides:
195 virtual void OnDisplayBoundsChanged( 205 virtual void OnDisplayBoundsChanged(
196 const gfx::Display& display) OVERRIDE; 206 const gfx::Display& display) OVERRIDE;
197 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; 207 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE;
198 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; 208 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE;
199 209
200 private: 210 private:
201 friend class internal::DisplayManager; 211 friend class internal::DisplayManager;
202 212
203 // Create a root window for given |display|. 213 // Create a root window for given |display|.
(...skipping 12 matching lines...) Expand all
216 const DisplayLayout& layout); 226 const DisplayLayout& layout);
217 227
218 void RegisterLayoutForDisplayIdPairInternal( 228 void RegisterLayoutForDisplayIdPairInternal(
219 int64 id1, 229 int64 id1,
220 int64 id2, 230 int64 id2,
221 const DisplayLayout& layout, 231 const DisplayLayout& layout,
222 bool override); 232 bool override);
223 233
224 void OnFadeOutForSwapDisplayFinished(); 234 void OnFadeOutForSwapDisplayFinished();
225 235
236 bool in_bootstrap() const { return in_bootstrap_; }
237
226 class DisplayChangeLimiter { 238 class DisplayChangeLimiter {
227 public: 239 public:
228 DisplayChangeLimiter(); 240 DisplayChangeLimiter();
229 241
230 // Sets how long the throttling should last. 242 // Sets how long the throttling should last.
231 void SetThrottleTimeout(int64 throttle_ms); 243 void SetThrottleTimeout(int64 throttle_ms);
232 244
233 bool IsThrottled() const; 245 bool IsThrottled() const;
234 246
235 private: 247 private:
(...skipping 15 matching lines...) Expand all
251 263
252 // Display layout per pair of devices. 264 // Display layout per pair of devices.
253 std::map<DisplayIdPair, DisplayLayout> paired_layouts_; 265 std::map<DisplayIdPair, DisplayLayout> paired_layouts_;
254 266
255 ObserverList<Observer> observers_; 267 ObserverList<Observer> observers_;
256 268
257 // Store the primary root window temporarily while replacing 269 // Store the primary root window temporarily while replacing
258 // display. 270 // display.
259 aura::RootWindow* primary_root_window_for_replace_; 271 aura::RootWindow* primary_root_window_for_replace_;
260 272
273 bool in_bootstrap_;
274
261 DISALLOW_COPY_AND_ASSIGN(DisplayController); 275 DISALLOW_COPY_AND_ASSIGN(DisplayController);
262 }; 276 };
263 277
264 } // namespace ash 278 } // namespace ash
265 279
266 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 280 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698