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

Unified Diff: trunk/src/ash/display/mouse_cursor_event_filter.cc

Issue 205313002: Revert 258077 "Remove PrepareForShutdown" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 | « no previous file | trunk/src/ash/display/screen_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/display/mouse_cursor_event_filter.cc
===================================================================
--- trunk/src/ash/display/mouse_cursor_event_filter.cc (revision 258102)
+++ trunk/src/ash/display/mouse_cursor_event_filter.cc (working copy)
@@ -8,7 +8,6 @@
#include "ash/display/display_controller.h"
#include "ash/display/display_manager.h"
#include "ash/display/shared_display_edge_indicator.h"
-#include "ash/root_window_controller.h"
#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/wm/coordinate_conversion.h"
@@ -76,16 +75,8 @@
}
void MouseCursorEventFilter::OnMouseEvent(ui::MouseEvent* event) {
- aura::Window* target = static_cast<aura::Window*>(event->target());
- RootWindowController* rwc = GetRootWindowController(target->GetRootWindow());
- // The root window controller is removed during the shutting down
- // RootWindow, so don't process events futher.
- if (!rwc) {
- event->StopPropagation();
- return;
- }
-
if (event->type() == ui::ET_MOUSE_PRESSED) {
+ aura::Window* target = static_cast<aura::Window*>(event->target());
scale_when_drag_started_ = ui::GetDeviceScaleFactor(target->layer());
} else if (event->type() == ui::ET_MOUSE_RELEASED) {
scale_when_drag_started_ = 1.0f;
@@ -105,6 +96,7 @@
}
gfx::Point point_in_screen(event->location());
+ aura::Window* target = static_cast<aura::Window*>(event->target());
wm::ConvertPointToScreen(target, &point_in_screen);
if (WarpMouseCursorIfNecessary(target->GetRootWindow(), point_in_screen))
event->StopPropagation();
« no previous file with comments | « no previous file | trunk/src/ash/display/screen_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698