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

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

Issue 2872343003: Remove InputMethodEventHandler. (Closed)
Patch Set: cleanup. Created 3 years, 7 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
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 #ifndef UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 5 #ifndef UI_AURA_WINDOW_EVENT_DISPATCHER_H_
6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // TODO(beng): This is only needed because this cleanup needs to happen after 114 // TODO(beng): This is only needed because this cleanup needs to happen after
115 // all other observers are notified of OnWindowDestroying() but 115 // all other observers are notified of OnWindowDestroying() but
116 // before OnWindowDestroyed() is sent (i.e. while the window 116 // before OnWindowDestroyed() is sent (i.e. while the window
117 // hierarchy is still intact). This didn't seem worth adding a 117 // hierarchy is still intact). This didn't seem worth adding a
118 // generic notification for as only this class needs to implement 118 // generic notification for as only this class needs to implement
119 // it. I would however like to find a way to do this via an 119 // it. I would however like to find a way to do this via an
120 // observer. 120 // observer.
121 void OnPostNotifiedWindowDestroying(Window* window); 121 void OnPostNotifiedWindowDestroying(Window* window);
122 122
123 // True to skip sending event to the InputMethod.
124 void set_skip_ime(bool skip_ime) { skip_ime_ = skip_ime; }
125
123 private: 126 private:
124 FRIEND_TEST_ALL_PREFIXES(WindowEventDispatcherTest, 127 FRIEND_TEST_ALL_PREFIXES(WindowEventDispatcherTest,
125 KeepTranslatedEventInRoot); 128 KeepTranslatedEventInRoot);
126 129
127 friend class test::WindowEventDispatcherTestApi; 130 friend class test::WindowEventDispatcherTestApi;
128 friend class Window; 131 friend class Window;
129 friend class TestScreen; 132 friend class TestScreen;
130 133
131 // The parameter for OnWindowHidden() to specify why window is hidden. 134 // The parameter for OnWindowHidden() to specify why window is hidden.
132 enum WindowHiddenReason { 135 enum WindowHiddenReason {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // Calls SynthesizeMouseMove() if |window| is currently visible and contains 234 // Calls SynthesizeMouseMove() if |window| is currently visible and contains
232 // the mouse cursor. 235 // the mouse cursor.
233 void SynthesizeMouseMoveAfterChangeToWindow(Window* window); 236 void SynthesizeMouseMoveAfterChangeToWindow(Window* window);
234 237
235 ui::EventDispatchDetails PreDispatchLocatedEvent(Window* target, 238 ui::EventDispatchDetails PreDispatchLocatedEvent(Window* target,
236 ui::LocatedEvent* event); 239 ui::LocatedEvent* event);
237 ui::EventDispatchDetails PreDispatchMouseEvent(Window* target, 240 ui::EventDispatchDetails PreDispatchMouseEvent(Window* target,
238 ui::MouseEvent* event); 241 ui::MouseEvent* event);
239 ui::EventDispatchDetails PreDispatchTouchEvent(Window* target, 242 ui::EventDispatchDetails PreDispatchTouchEvent(Window* target,
240 ui::TouchEvent* event); 243 ui::TouchEvent* event);
244 ui::EventDispatchDetails PreDispatchKeyEvent(ui::KeyEvent* event);
241 245
242 WindowTreeHost* host_; 246 WindowTreeHost* host_;
243 247
244 Window* mouse_pressed_handler_; 248 Window* mouse_pressed_handler_;
245 Window* mouse_moved_handler_; 249 Window* mouse_moved_handler_;
246 Window* event_dispatch_target_; 250 Window* event_dispatch_target_;
247 Window* old_dispatch_target_; 251 Window* old_dispatch_target_;
248 252
249 ui::FractionOfTimeWithoutUserInputRecorder 253 ui::FractionOfTimeWithoutUserInputRecorder
250 fraction_of_time_without_user_input_recorder_; 254 fraction_of_time_without_user_input_recorder_;
(...skipping 12 matching lines...) Expand all
263 // Set when dispatching a held event. 267 // Set when dispatching a held event.
264 ui::LocatedEvent* dispatching_held_event_; 268 ui::LocatedEvent* dispatching_held_event_;
265 269
266 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; 270 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
267 271
268 std::unique_ptr<MusMouseLocationUpdater> mus_mouse_location_updater_; 272 std::unique_ptr<MusMouseLocationUpdater> mus_mouse_location_updater_;
269 273
270 // The default EventTargeter for WindowEventDispatcher generated events. 274 // The default EventTargeter for WindowEventDispatcher generated events.
271 std::unique_ptr<WindowTargeter> event_targeter_; 275 std::unique_ptr<WindowTargeter> event_targeter_;
272 276
277 bool skip_ime_;
278
273 // Used to schedule reposting an event. 279 // Used to schedule reposting an event.
274 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; 280 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_;
275 281
276 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 282 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
277 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 283 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
278 284
279 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 285 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
280 }; 286 };
281 287
282 } // namespace aura 288 } // namespace aura
283 289
284 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 290 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698