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

Unified Diff: ash/display/mouse_cursor_event_filter.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/display/mouse_cursor_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/mouse_cursor_event_filter.cc
diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc
index 44618684ecb9f3cd7af8a2c089ae14cbe82f6074..f4e4f0e68f34c50129cddd19a8e59c3333854d43 100644
--- a/ash/display/mouse_cursor_event_filter.cc
+++ b/ash/display/mouse_cursor_event_filter.cc
@@ -48,7 +48,7 @@ MouseCursorEventFilter::~MouseCursorEventFilter() {
void MouseCursorEventFilter::ShowSharedEdgeIndicator(
const aura::RootWindow* from) {
HideSharedEdgeIndicator();
- if (gfx::Screen::GetNumDisplays() <= 1 || from == NULL) {
+ if (Shell::GetScreen()->GetNumDisplays() <= 1 || from == NULL) {
src_indicator_bounds_.SetRect(0, 0, 0, 0);
dst_indicator_bounds_.SetRect(0, 0, 0, 0);
drag_source_root_ = NULL;
@@ -107,7 +107,8 @@ ui::EventResult MouseCursorEventFilter::PreHandleGestureEvent(
bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(
aura::RootWindow* target_root,
const gfx::Point& point_in_screen) {
- if (gfx::Screen::GetNumDisplays() <= 1 || mouse_warp_mode_ == WARP_NONE)
+ if (Shell::GetScreen()->GetNumDisplays() <= 1 ||
+ mouse_warp_mode_ == WARP_NONE)
return false;
const float scale = ui::GetDeviceScaleFactor(target_root->layer());
@@ -147,7 +148,7 @@ bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(
if (dst_root->bounds().Contains(point_in_dst_screen)) {
DCHECK_NE(dst_root, root_at_point);
dst_root->MoveCursorTo(point_in_dst_screen);
- ash::Shell::GetInstance()->cursor_manager()->SetDeviceScaleFactor(
+ Shell::GetInstance()->cursor_manager()->SetDeviceScaleFactor(
dst_root->AsRootWindowHostDelegate()->GetDeviceScaleFactor());
return true;
}
@@ -157,7 +158,8 @@ bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(
void MouseCursorEventFilter::UpdateHorizontalIndicatorWindowBounds() {
bool from_primary = Shell::GetPrimaryRootWindow() == drag_source_root_;
- const gfx::Rect& primary_bounds = gfx::Screen::GetPrimaryDisplay().bounds();
+ const gfx::Rect& primary_bounds =
+ Shell::GetScreen()->GetPrimaryDisplay().bounds();
const gfx::Rect& secondary_bounds = ScreenAsh::GetSecondaryDisplay().bounds();
DisplayLayout::Position position = Shell::GetInstance()->
display_controller()->GetCurrentDisplayLayout().position;
@@ -184,7 +186,8 @@ void MouseCursorEventFilter::UpdateHorizontalIndicatorWindowBounds() {
void MouseCursorEventFilter::UpdateVerticalIndicatorWindowBounds() {
bool in_primary = Shell::GetPrimaryRootWindow() == drag_source_root_;
- const gfx::Rect& primary_bounds = gfx::Screen::GetPrimaryDisplay().bounds();
+ const gfx::Rect& primary_bounds =
+ Shell::GetScreen()->GetPrimaryDisplay().bounds();
const gfx::Rect& secondary_bounds = ScreenAsh::GetSecondaryDisplay().bounds();
DisplayLayout::Position position = Shell::GetInstance()->
display_controller()->GetCurrentDisplayLayout().position;
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/display/mouse_cursor_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698