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

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

Issue 379773003: Simplify the logic in DesktopWindowTreeHostX11 for FocusOut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
209 void WindowEventDispatcher::OnCursorMovedToRootLocation( 204 void WindowEventDispatcher::OnCursorMovedToRootLocation(
210 const gfx::Point& root_location) { 205 const gfx::Point& root_location) {
211 SetLastMouseLocation(window(), root_location); 206 SetLastMouseLocation(window(), root_location);
212 synthesize_mouse_move_ = false; 207 synthesize_mouse_move_ = false;
213 } 208 }
214 209
215 void WindowEventDispatcher::OnPostNotifiedWindowDestroying(Window* window) { 210 void WindowEventDispatcher::OnPostNotifiedWindowDestroying(Window* window) {
216 OnWindowHidden(window, WINDOW_DESTROYED); 211 OnWindowHidden(window, WINDOW_DESTROYED);
217 } 212 }
218 213
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 break; 858 break;
864 859
865 default: 860 default:
866 NOTREACHED(); 861 NOTREACHED();
867 break; 862 break;
868 } 863 }
869 PreDispatchLocatedEvent(target, event); 864 PreDispatchLocatedEvent(target, event);
870 } 865 }
871 866
872 } // namespace aura 867 } // 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