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

Side by Side Diff: ash/shell.cc

Issue 10835047: Allow the cursor to warp even when a window is dragged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 4 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
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 #include "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 aura::RootWindow* Shell::GetPrimaryRootWindow() { 325 aura::RootWindow* Shell::GetPrimaryRootWindow() {
326 return GetInstance()->display_controller()->GetPrimaryRootWindow(); 326 return GetInstance()->display_controller()->GetPrimaryRootWindow();
327 } 327 }
328 328
329 // static 329 // static
330 aura::RootWindow* Shell::GetActiveRootWindow() { 330 aura::RootWindow* Shell::GetActiveRootWindow() {
331 return GetInstance()->active_root_window_; 331 return GetInstance()->active_root_window_;
332 } 332 }
333 333
334 // static 334 // static
335 aura::RootWindow* Shell::GetRootWindowAt(const gfx::Point& point) {
336 const gfx::Display& display = gfx::Screen::GetDisplayNearestPoint(point);
337 return Shell::GetInstance()->display_controller()->
338 GetRootWindowForDisplayId(display.id());
339 }
340
341 // static
342 aura::RootWindow* Shell::GetRootWindowMatching(const gfx::Rect& rect) {
343 const gfx::Display& display = gfx::Screen::GetDisplayMatching(rect);
344 return Shell::GetInstance()->display_controller()->
345 GetRootWindowForDisplayId(display.id());
346 }
347
348 // static
349 Shell::RootWindowList Shell::GetAllRootWindows() { 335 Shell::RootWindowList Shell::GetAllRootWindows() {
350 return Shell::GetInstance()->display_controller()-> 336 return Shell::GetInstance()->display_controller()->
351 GetAllRootWindows(); 337 GetAllRootWindows();
352 } 338 }
353 339
354 // static 340 // static
355 aura::Window* Shell::GetContainer(aura::RootWindow* root_window, 341 aura::Window* Shell::GetContainer(aura::RootWindow* root_window,
356 int container_id) { 342 int container_id) {
357 return root_window->GetChildById(container_id); 343 return root_window->GetChildById(container_id);
358 } 344 }
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 773 }
788 774
789 void Shell::ShowCursor(bool visible) { 775 void Shell::ShowCursor(bool visible) {
790 RootWindowList root_windows = GetAllRootWindows(); 776 RootWindowList root_windows = GetAllRootWindows();
791 for (RootWindowList::iterator iter = root_windows.begin(); 777 for (RootWindowList::iterator iter = root_windows.begin();
792 iter != root_windows.end(); ++iter) 778 iter != root_windows.end(); ++iter)
793 (*iter)->ShowCursor(visible); 779 (*iter)->ShowCursor(visible);
794 } 780 }
795 781
796 } // namespace ash 782 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698