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

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

Issue 9788001: Remove stops_event_propagation from Window, since it's broken. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/client/event_client.cc ('k') | ui/aura/root_window_unittest.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 (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 "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "ui/aura/aura_switches.h" 13 #include "ui/aura/aura_switches.h"
14 #include "ui/aura/client/activation_client.h" 14 #include "ui/aura/client/activation_client.h"
15 #include "ui/aura/client/event_client.h"
15 #include "ui/aura/env.h" 16 #include "ui/aura/env.h"
16 #include "ui/aura/root_window_host.h" 17 #include "ui/aura/root_window_host.h"
17 #include "ui/aura/root_window_observer.h" 18 #include "ui/aura/root_window_observer.h"
18 #include "ui/aura/event.h" 19 #include "ui/aura/event.h"
19 #include "ui/aura/event_filter.h" 20 #include "ui/aura/event_filter.h"
20 #include "ui/aura/focus_manager.h" 21 #include "ui/aura/focus_manager.h"
21 #include "ui/aura/gestures/gesture_recognizer.h" 22 #include "ui/aura/gestures/gesture_recognizer.h"
22 #include "ui/aura/monitor.h" 23 #include "ui/aura/monitor.h"
23 #include "ui/aura/monitor_manager.h" 24 #include "ui/aura/monitor_manager.h"
24 #include "ui/aura/window.h" 25 #include "ui/aura/window.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 184 }
184 } 185 }
185 return DispatchMouseEventImpl(event); 186 return DispatchMouseEventImpl(event);
186 } 187 }
187 188
188 bool RootWindow::DispatchKeyEvent(KeyEvent* event) { 189 bool RootWindow::DispatchKeyEvent(KeyEvent* event) {
189 DispatchHeldMouseMove(); 190 DispatchHeldMouseMove();
190 KeyEvent translated_event(*event); 191 KeyEvent translated_event(*event);
191 if (translated_event.key_code() == ui::VKEY_UNKNOWN) 192 if (translated_event.key_code() == ui::VKEY_UNKNOWN)
192 return false; 193 return false;
194 client::EventClient* client = client::GetEventClient(GetRootWindow());
195 if (client && !client->CanProcessEventsWithinSubtree(focused_window_)) {
196 SetFocusedWindow(NULL, NULL);
197 return false;
198 }
193 return ProcessKeyEvent(focused_window_, &translated_event); 199 return ProcessKeyEvent(focused_window_, &translated_event);
194 } 200 }
195 201
196 bool RootWindow::DispatchScrollEvent(ScrollEvent* event) { 202 bool RootWindow::DispatchScrollEvent(ScrollEvent* event) {
197 DispatchHeldMouseMove(); 203 DispatchHeldMouseMove();
198 event->UpdateForRootTransform(layer()->transform()); 204 event->UpdateForRootTransform(layer()->transform());
199 205
200 last_mouse_location_ = event->location(); 206 last_mouse_location_ = event->location();
201 synthesize_mouse_move_ = false; 207 synthesize_mouse_move_ = false;
202 208
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 // is currently broken. See/ crbug.com/107931. 815 // is currently broken. See/ crbug.com/107931.
810 MouseEvent event(ui::ET_MOUSE_MOVED, 816 MouseEvent event(ui::ET_MOUSE_MOVED,
811 orig_mouse_location, 817 orig_mouse_location,
812 orig_mouse_location, 818 orig_mouse_location,
813 ui::EF_IS_SYNTHESIZED); 819 ui::EF_IS_SYNTHESIZED);
814 DispatchMouseEvent(&event); 820 DispatchMouseEvent(&event);
815 #endif 821 #endif
816 } 822 }
817 823
818 } // namespace aura 824 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/client/event_client.cc ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698