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

Side by Side Diff: ui/aura/window_event_dispatcher.cc

Issue 409223003: Revert of Simplify the logic in DesktopWindowTreeHostX11 for FocusOut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « ui/aura/window_event_dispatcher.h ('k') | ui/aura/window_tree_host_x11.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/aura/window_event_dispatcher.h" 5 #include "ui/aura/window_event_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 gfx::Point WindowEventDispatcher::GetLastMouseLocationInRoot() const { 195 gfx::Point WindowEventDispatcher::GetLastMouseLocationInRoot() const {
196 gfx::Point location = Env::GetInstance()->last_mouse_location(); 196 gfx::Point location = Env::GetInstance()->last_mouse_location();
197 client::ScreenPositionClient* client = 197 client::ScreenPositionClient* client =
198 client::GetScreenPositionClient(window()); 198 client::GetScreenPositionClient(window());
199 if (client) 199 if (client)
200 client->ConvertPointFromScreen(window(), &location); 200 client->ConvertPointFromScreen(window(), &location);
201 return location; 201 return location;
202 } 202 }
203 203
204 void WindowEventDispatcher::OnHostLostMouseGrab() {
205 mouse_pressed_handler_ = NULL;
206 mouse_moved_handler_ = NULL;
207 }
208
204 void WindowEventDispatcher::OnCursorMovedToRootLocation( 209 void WindowEventDispatcher::OnCursorMovedToRootLocation(
205 const gfx::Point& root_location) { 210 const gfx::Point& root_location) {
206 SetLastMouseLocation(window(), root_location); 211 SetLastMouseLocation(window(), root_location);
207 synthesize_mouse_move_ = false; 212 synthesize_mouse_move_ = false;
208 } 213 }
209 214
210 void WindowEventDispatcher::OnPostNotifiedWindowDestroying(Window* window) { 215 void WindowEventDispatcher::OnPostNotifiedWindowDestroying(Window* window) {
211 OnWindowHidden(window, WINDOW_DESTROYED); 216 OnWindowHidden(window, WINDOW_DESTROYED);
212 } 217 }
213 218
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 break; 863 break;
859 864
860 default: 865 default:
861 NOTREACHED(); 866 NOTREACHED();
862 break; 867 break;
863 } 868 }
864 PreDispatchLocatedEvent(target, event); 869 PreDispatchLocatedEvent(target, event);
865 } 870 }
866 871
867 } // namespace aura 872 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_event_dispatcher.h ('k') | ui/aura/window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698