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

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

Issue 2872343003: Remove InputMethodEventHandler. (Closed)
Patch Set: Fix X11 and Win 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 bool should_skip_ime() const { return skip_ime_; }
126
123 private: 127 private:
124 FRIEND_TEST_ALL_PREFIXES(WindowEventDispatcherTest, 128 FRIEND_TEST_ALL_PREFIXES(WindowEventDispatcherTest,
125 KeepTranslatedEventInRoot); 129 KeepTranslatedEventInRoot);
126 130
127 friend class test::WindowEventDispatcherTestApi; 131 friend class test::WindowEventDispatcherTestApi;
128 friend class Window; 132 friend class Window;
129 friend class TestScreen; 133 friend class TestScreen;
130 134
131 // The parameter for OnWindowHidden() to specify why window is hidden. 135 // The parameter for OnWindowHidden() to specify why window is hidden.
132 enum WindowHiddenReason { 136 enum WindowHiddenReason {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // Calls SynthesizeMouseMove() if |window| is currently visible and contains 235 // Calls SynthesizeMouseMove() if |window| is currently visible and contains
232 // the mouse cursor. 236 // the mouse cursor.
233 void SynthesizeMouseMoveAfterChangeToWindow(Window* window); 237 void SynthesizeMouseMoveAfterChangeToWindow(Window* window);
234 238
235 ui::EventDispatchDetails PreDispatchLocatedEvent(Window* target, 239 ui::EventDispatchDetails PreDispatchLocatedEvent(Window* target,
236 ui::LocatedEvent* event); 240 ui::LocatedEvent* event);
237 ui::EventDispatchDetails PreDispatchMouseEvent(Window* target, 241 ui::EventDispatchDetails PreDispatchMouseEvent(Window* target,
238 ui::MouseEvent* event); 242 ui::MouseEvent* event);
239 ui::EventDispatchDetails PreDispatchTouchEvent(Window* target, 243 ui::EventDispatchDetails PreDispatchTouchEvent(Window* target,
240 ui::TouchEvent* event); 244 ui::TouchEvent* event);
245 ui::EventDispatchDetails PreDispatchKeyEvent(ui::KeyEvent* event);
241 246
242 WindowTreeHost* host_; 247 WindowTreeHost* host_;
243 248
244 Window* mouse_pressed_handler_; 249 Window* mouse_pressed_handler_;
245 Window* mouse_moved_handler_; 250 Window* mouse_moved_handler_;
246 Window* event_dispatch_target_; 251 Window* event_dispatch_target_;
247 Window* old_dispatch_target_; 252 Window* old_dispatch_target_;
248 253
249 ui::FractionOfTimeWithoutUserInputRecorder 254 ui::FractionOfTimeWithoutUserInputRecorder
250 fraction_of_time_without_user_input_recorder_; 255 fraction_of_time_without_user_input_recorder_;
(...skipping 12 matching lines...) Expand all
263 // Set when dispatching a held event. 268 // Set when dispatching a held event.
264 ui::LocatedEvent* dispatching_held_event_; 269 ui::LocatedEvent* dispatching_held_event_;
265 270
266 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_; 271 ScopedObserver<aura::Window, aura::WindowObserver> observer_manager_;
267 272
268 std::unique_ptr<MusMouseLocationUpdater> mus_mouse_location_updater_; 273 std::unique_ptr<MusMouseLocationUpdater> mus_mouse_location_updater_;
269 274
270 // The default EventTargeter for WindowEventDispatcher generated events. 275 // The default EventTargeter for WindowEventDispatcher generated events.
271 std::unique_ptr<WindowTargeter> event_targeter_; 276 std::unique_ptr<WindowTargeter> event_targeter_;
272 277
278 bool skip_ime_;
279
273 // Used to schedule reposting an event. 280 // Used to schedule reposting an event.
274 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_; 281 base::WeakPtrFactory<WindowEventDispatcher> repost_event_factory_;
275 282
276 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 283 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
277 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 284 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
278 285
279 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 286 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
280 }; 287 };
281 288
282 } // namespace aura 289 } // namespace aura
283 290
284 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 291 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698