diff --git a/ash/accelerators/key_hold_detector.cc b/ash/accelerators/key_hold_detector.cc index 0908c2cd9429c0..179d4f3cb2eea7 100644 --- a/ash/accelerators/key_hold_detector.cc +++ b/ash/accelerators/key_hold_detector.cc @@ -11,9 +11,10 @@ #include "ash/shell.h" #include "base/message_loop/message_loop.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_tracker.h" +#include "ui/aura/window_tree_host.h" #include "ui/events/event_dispatcher.h" +#include "ui/events/event_processor.h" namespace ash { namespace { @@ -27,7 +28,7 @@ void DispatchPressedEvent(XEvent native_event, ui::KeyEvent event(&native_event, false); event.set_flags(event.flags() | ui::EF_IS_SYNTHESIZED); ui::EventDispatchDetails result ALLOW_UNUSED = - target->GetHost()->dispatcher()->OnEventFromSource(&event); + target->GetHost()->event_processor()->OnEventFromSource(&event); } void PostPressedEvent(ui::KeyEvent* event) { diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc index dd5e4a0f98b28f..e356602874167a 100644 --- a/ash/autoclick/autoclick_controller.cc +++ b/ash/autoclick/autoclick_controller.cc @@ -8,10 +8,11 @@ #include "ash/wm/coordinate_conversion.h" #include "base/timer/timer.h" #include "ui/aura/env.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/events/event.h" #include "ui/events/event_constants.h" #include "ui/events/event_handler.h" +#include "ui/events/event_processor.h" #include "ui/gfx/point.h" #include "ui/gfx/vector2d.h" @@ -201,9 +202,9 @@ void AutoclickControllerImpl::DoAutoclick() { ui::EF_LEFT_MOUSE_BUTTON); ui::EventDispatchDetails details = - host->dispatcher()->OnEventFromSource(&press_event); + host->event_processor()->OnEventFromSource(&press_event); if (!details.dispatcher_destroyed) - details = host->dispatcher()->OnEventFromSource(&release_event); + details = host->event_processor()->OnEventFromSource(&release_event); if (details.dispatcher_destroyed) return; } diff --git a/ash/debug.cc b/ash/debug.cc index d72b58fcac2225..ec28618d580cbd 100644 --- a/ash/debug.cc +++ b/ash/debug.cc @@ -6,7 +6,7 @@ #include "ash/shell.h" #include "cc/debug/layer_tree_debug_state.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/compositor/compositor.h" namespace ash { diff --git a/ash/display/display_controller_unittest.cc b/ash/display/display_controller_unittest.cc index 5b7d6a962298a4..6a49e2a36eb181 100644 --- a/ash/display/display_controller_unittest.cc +++ b/ash/display/display_controller_unittest.cc @@ -26,8 +26,8 @@ #include "ui/aura/client/focus_client.h" #include "ui/aura/env.h" #include "ui/aura/test/event_generator.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_tracker.h" +#include "ui/aura/window_tree_host.h" #include "ui/events/event_handler.h" #include "ui/gfx/display.h" #include "ui/gfx/screen.h" diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc index c798b3d81997b1..85df8bb553ceb1 100644 --- a/ash/display/display_manager_unittest.cc +++ b/ash/display/display_manager_unittest.cc @@ -16,8 +16,8 @@ #include "base/strings/stringprintf.h" #include "ui/aura/env.h" #include "ui/aura/test/event_generator.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_observer.h" +#include "ui/aura/window_tree_host.h" #include "ui/gfx/display_observer.h" #include "ui/gfx/display.h" #include "ui/gfx/screen.h" diff --git a/ash/display/screen_position_controller_unittest.cc b/ash/display/screen_position_controller_unittest.cc index 347ff7f8fb68f8..94fe7158e48c20 100644 --- a/ash/display/screen_position_controller_unittest.cc +++ b/ash/display/screen_position_controller_unittest.cc @@ -11,7 +11,7 @@ #include "ash/test/shell_test_api.h" #include "ui/aura/env.h" #include "ui/aura/test/test_window_delegate.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/layout.h" #include "ui/gfx/screen.h" diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc index 4a3e9a8681ce15..4051cc674dbd0a 100644 --- a/ash/drag_drop/drag_drop_controller_unittest.cc +++ b/ash/drag_drop/drag_drop_controller_unittest.cc @@ -14,6 +14,7 @@ #include "ui/aura/client/capture_client.h" #include "ui/aura/test/event_generator.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" #include "ui/base/dragdrop/drag_drop_types.h" @@ -738,7 +739,7 @@ TEST_F(DragDropControllerTest, SyntheticEventsDuringDragDrop) { ui::MouseEvent mouse_move(ui::ET_MOUSE_MOVED, mouse_move_location, mouse_move_location, 0, 0); ui::EventDispatchDetails details = Shell::GetPrimaryRootWindow()-> - GetHost()->dispatcher()->OnEventFromSource(&mouse_move); + GetHost()->event_processor()->OnEventFromSource(&mouse_move); ASSERT_FALSE(details.dispatcher_destroyed); } diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc index 300e390911ab04..dd3b0d8bca32f0 100644 --- a/ash/magnifier/magnification_controller.cc +++ b/ash/magnifier/magnification_controller.cc @@ -15,8 +15,8 @@ #include "ui/aura/client/cursor_client.h" #include "ui/aura/root_window_transformer.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_property.h" +#include "ui/aura/window_tree_host.h" #include "ui/compositor/dip_util.h" #include "ui/compositor/layer.h" #include "ui/compositor/layer_animation_observer.h" diff --git a/ash/magnifier/magnification_controller_unittest.cc b/ash/magnifier/magnification_controller_unittest.cc index 889b0a83a72c9e..5ad2d12b99a955 100644 --- a/ash/magnifier/magnification_controller_unittest.cc +++ b/ash/magnifier/magnification_controller_unittest.cc @@ -11,7 +11,7 @@ #include "ui/aura/client/aura_constants.h" #include "ui/aura/env.h" #include "ui/aura/test/event_generator.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/gfx/rect_conversions.h" #include "ui/gfx/screen.h" diff --git a/ash/magnifier/partial_magnification_controller.cc b/ash/magnifier/partial_magnification_controller.cc index 4ff484505cf388..38bf7f4d5ba404 100644 --- a/ash/magnifier/partial_magnification_controller.cc +++ b/ash/magnifier/partial_magnification_controller.cc @@ -6,9 +6,10 @@ #include "ash/shell.h" #include "ash/shell_window_ids.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window.h" +#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_property.h" +#include "ui/aura/window_tree_host.h" #include "ui/gfx/screen.h" #include "ui/compositor/layer.h" #include "ui/views/layout/fill_layout.h" diff --git a/ash/shell/content_client/shell_browser_main_parts.cc b/ash/shell/content_client/shell_browser_main_parts.cc index d8098077c6308c..7a745c6b833e3f 100644 --- a/ash/shell/content_client/shell_browser_main_parts.cc +++ b/ash/shell/content_client/shell_browser_main_parts.cc @@ -23,7 +23,7 @@ #include "net/base/net_module.h" #include "ui/aura/env.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_paths.h" #include "ui/compositor/compositor.h" diff --git a/ash/shell/window_watcher_unittest.cc b/ash/shell/window_watcher_unittest.cc index b6fe61bd2f29f1..90ed40719834a3 100644 --- a/ash/shell/window_watcher_unittest.cc +++ b/ash/shell/window_watcher_unittest.cc @@ -9,7 +9,7 @@ #include "ash/shell/shell_delegate_impl.h" #include "ash/system/user/login_status.h" #include "ash/test/ash_test_base.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" namespace ash { diff --git a/ash/sticky_keys/sticky_keys_controller.cc b/ash/sticky_keys/sticky_keys_controller.cc index dd80cf110cf715..812e46eaa233a0 100644 --- a/ash/sticky_keys/sticky_keys_controller.cc +++ b/ash/sticky_keys/sticky_keys_controller.cc @@ -14,9 +14,10 @@ #include "base/basictypes.h" #include "base/debug/stack_trace.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_tracker.h" +#include "ui/aura/window_tree_host.h" #include "ui/events/event.h" +#include "ui/events/event_processor.h" #include "ui/events/keycodes/keyboard_code_conversion.h" namespace ash { @@ -86,7 +87,7 @@ void StickyKeysHandlerDelegateImpl::DispatchEvent(ui::Event* event, aura::Window* target) { DCHECK(target); ui::EventDispatchDetails details = - target->GetHost()->dispatcher()->OnEventFromSource(event); + target->GetHost()->event_processor()->OnEventFromSource(event); if (details.dispatcher_destroyed) return; } diff --git a/ash/sticky_keys/sticky_keys_overlay_unittest.cc b/ash/sticky_keys/sticky_keys_overlay_unittest.cc index 246481dcf6e07b..5a41e63e073382 100644 --- a/ash/sticky_keys/sticky_keys_overlay_unittest.cc +++ b/ash/sticky_keys/sticky_keys_overlay_unittest.cc @@ -8,8 +8,9 @@ #include "ash/sticky_keys/sticky_keys_controller.h" #include "ash/test/ash_test_base.h" #include "base/memory/scoped_ptr.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/events/event.h" +#include "ui/events/event_processor.h" namespace ash { @@ -41,7 +42,7 @@ class StickyKeysOverlayTest : public test::AshTestBase { dispatcher.set_target(Shell::GetInstance()->GetPrimaryRootWindow()); ui::EventDispatchDetails details = Shell::GetPrimaryRootWindow()-> - GetHost()->dispatcher()->OnEventFromSource(&event); + GetHost()->event_processor()->OnEventFromSource(&event); CHECK(!details.dispatcher_destroyed); } diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc index 1f2156bc42712e..21bbbd70c5bcf4 100644 --- a/ash/test/ash_test_base.cc +++ b/ash/test/ash_test_base.cc @@ -27,7 +27,7 @@ #include "ui/aura/test/test_window_delegate.h" #include "ui/aura/window.h" #include "ui/aura/window_delegate.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/ime/input_method_initializer.h" #include "ui/events/gestures/gesture_configuration.h" #include "ui/gfx/display.h" diff --git a/ash/test/ui_controls_factory_ash.cc b/ash/test/ui_controls_factory_ash.cc index 0c3caa3e399d9a..cbdeddb0847ccf 100644 --- a/ash/test/ui_controls_factory_ash.cc +++ b/ash/test/ui_controls_factory_ash.cc @@ -10,8 +10,8 @@ #include "ui/aura/client/screen_position_client.h" #include "ui/aura/env.h" #include "ui/aura/test/ui_controls_factory_aura.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_property.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/test/ui_controls.h" #include "ui/base/test/ui_controls_aura.h" #include "ui/gfx/screen.h" @@ -35,7 +35,7 @@ UIControlsAura* GetUIControlsForRootWindow(aura::Window* root_window) { root_window->GetProperty(kUIControlsKey); if (!native_ui_control) { native_ui_control = - aura::test::CreateUIControlsAura(root_window->GetHost()->dispatcher()); + aura::test::CreateUIControlsAura(root_window->GetHost()); // Pass the ownership to the |root_window|. root_window->SetProperty(kUIControlsKey, native_ui_control); } diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc index ba56a7c612b691..d9f4b6af6e449c 100644 --- a/ash/wm/ash_native_cursor_manager.cc +++ b/ash/wm/ash_native_cursor_manager.cc @@ -11,6 +11,7 @@ #include "base/logging.h" #include "ui/aura/env.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/cursor/cursor.h" namespace ash { diff --git a/ash/wm/ash_native_cursor_manager_interactive_uitest.cc b/ash/wm/ash_native_cursor_manager_interactive_uitest.cc index 6d2038f8afbb90..771b725e9a568b 100644 --- a/ash/wm/ash_native_cursor_manager_interactive_uitest.cc +++ b/ash/wm/ash_native_cursor_manager_interactive_uitest.cc @@ -11,7 +11,7 @@ #include "base/path_service.h" #include "base/run_loop.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/test/ui_controls.h" #include "ui/base/ui_base_paths.h" diff --git a/ash/wm/boot_splash_screen_chromeos.cc b/ash/wm/boot_splash_screen_chromeos.cc index 67ecd6db3ec95a..df5765499ef991 100644 --- a/ash/wm/boot_splash_screen_chromeos.cc +++ b/ash/wm/boot_splash_screen_chromeos.cc @@ -6,7 +6,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/x/x11_util.h" #include "ui/compositor/layer.h" #include "ui/compositor/layer_type.h" diff --git a/ash/wm/lock_state_controller.cc b/ash/wm/lock_state_controller.cc index 2ba435c2fde3cd..54198ba35ac837 100644 --- a/ash/wm/lock_state_controller.cc +++ b/ash/wm/lock_state_controller.cc @@ -17,7 +17,7 @@ #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/timer/timer.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/compositor/layer_animation_sequence.h" #include "ui/compositor/scoped_layer_animation_settings.h" #include "ui/views/controls/menu/menu_controller.h" diff --git a/ash/wm/toplevel_window_event_handler.cc b/ash/wm/toplevel_window_event_handler.cc index 57fb7eee2cc71a..872fd0328615fb 100644 --- a/ash/wm/toplevel_window_event_handler.cc +++ b/ash/wm/toplevel_window_event_handler.cc @@ -19,6 +19,7 @@ #include "ui/aura/window_delegate.h" #include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_observer.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/cursor/cursor.h" #include "ui/base/hit_test.h" #include "ui/base/ui_base_types.h" diff --git a/chrome/browser/chrome_plugin_browsertest.cc b/chrome/browser/chrome_plugin_browsertest.cc index 40c83d88bb14e0..06ea31e9cf0805 100644 --- a/chrome/browser/chrome_plugin_browsertest.cc +++ b/chrome/browser/chrome_plugin_browsertest.cc @@ -36,7 +36,7 @@ #if defined(OS_WIN) #include "content/public/browser/web_contents_view.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif using content::BrowserThread; diff --git a/chrome/browser/extensions/api/input/input.cc b/chrome/browser/extensions/api/input/input.cc index 984b37de0ee6d9..fcc5c7ec3e2b34 100644 --- a/chrome/browser/extensions/api/input/input.cc +++ b/chrome/browser/extensions/api/input/input.cc @@ -18,6 +18,7 @@ #if defined(USE_ASH) #include "ash/root_window_controller.h" #include "ash/shell.h" +#include "ui/aura/window_tree_host.h" #include "ui/keyboard/keyboard_util.h" #endif @@ -61,7 +62,7 @@ bool VirtualKeyboardPrivateMoveCursorFunction::RunImpl() { return keyboard::MoveCursor( swipe_direction, modifier_flags, - ash::Shell::GetPrimaryRootWindow()->GetHost()->dispatcher()); + ash::Shell::GetPrimaryRootWindow()->GetHost()); #else error_ = kNotYetImplementedError; return false; @@ -93,7 +94,7 @@ bool VirtualKeyboardPrivateSendKeyEventFunction::RunImpl() { key_code, key_name, modifiers, - ash::Shell::GetPrimaryRootWindow()->GetHost()->dispatcher()); + ash::Shell::GetPrimaryRootWindow()->GetHost()); #else error_ = kNotYetImplementedError; return false; diff --git a/chrome/browser/extensions/extension_tabs_apitest.cc b/chrome/browser/extensions/extension_tabs_apitest.cc index 14f1dff4b2f066..b04128db114e53 100644 --- a/chrome/browser/extensions/extension_tabs_apitest.cc +++ b/chrome/browser/extensions/extension_tabs_apitest.cc @@ -16,7 +16,7 @@ #if defined(OS_WIN) #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif // Window resizes are not completed by the time the callback happens, diff --git a/chrome/browser/first_run/try_chrome_dialog_view.cc b/chrome/browser/first_run/try_chrome_dialog_view.cc index dd0fed73a0c2d7..7376e6e49e7ecc 100644 --- a/chrome/browser/first_run/try_chrome_dialog_view.cc +++ b/chrome/browser/first_run/try_chrome_dialog_view.cc @@ -33,7 +33,7 @@ #if defined(USE_AURA) #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif namespace { diff --git a/chrome/browser/password_manager/password_manager_util_win.cc b/chrome/browser/password_manager/password_manager_util_win.cc index 98811e5e58b370..c38a35ac2e65e5 100644 --- a/chrome/browser/password_manager/password_manager_util_win.cc +++ b/chrome/browser/password_manager/password_manager_util_win.cc @@ -31,7 +31,7 @@ #if defined(USE_AURA) #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif // static diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc index 91a05580aca02c..79cb93e456b371 100644 --- a/chrome/browser/printing/print_dialog_cloud.cc +++ b/chrome/browser/printing/print_dialog_cloud.cc @@ -42,7 +42,7 @@ #if defined(USE_AURA) #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif #if defined(OS_WIN) diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc index 4696368d812c04..ed912adcce6e87 100644 --- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc +++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc @@ -25,7 +25,7 @@ #if defined(USE_AURA) #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif #if defined(OS_MACOSX) diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc index 3c78a1cebdbb93..8cfd74d117a6d7 100644 --- a/chrome/browser/ui/ash/ash_init.cc +++ b/chrome/browser/ui/ash/ash_init.cc @@ -19,7 +19,7 @@ #include "chrome/browser/ui/ash/screenshot_taker.h" #include "chrome/common/chrome_switches.h" #include "ui/aura/env.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #if defined(OS_CHROMEOS) #include "base/sys_info.h" diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc index dc18d50efd3ae7..984829e1815c77 100644 --- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc +++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc @@ -45,7 +45,7 @@ #if defined(OS_WIN) #include "content/public/browser/web_contents_view.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif using base::ASCIIToUTF16; diff --git a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc index 9bf570904d4f2c..4f27d86798396f 100644 --- a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc +++ b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc @@ -23,8 +23,8 @@ #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h" #include "grit/ui_strings.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_observer.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/l10n/l10n_util.h" #include "ui/shell_dialogs/select_file_dialog.h" diff --git a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc index 564ecfb9bd313a..784d56181dee74 100644 --- a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc +++ b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc @@ -20,7 +20,7 @@ #include "content/public/browser/browser_thread.h" #include "grit/generated_resources.h" #include "grit/ui_strings.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/l10n/l10n_util.h" // These conflict with base/tracked_objects.h, so need to come last. diff --git a/chrome/browser/ui/views/certificate_viewer_win.cc b/chrome/browser/ui/views/certificate_viewer_win.cc index 2c355d7cf8a2a6..31ab081f908c05 100644 --- a/chrome/browser/ui/views/certificate_viewer_win.cc +++ b/chrome/browser/ui/views/certificate_viewer_win.cc @@ -15,7 +15,7 @@ #if defined(USE_AURA) #include "chrome/browser/ui/host_desktop.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif namespace { diff --git a/chrome/browser/ui/views/desktop_media_picker_views.cc b/chrome/browser/ui/views/desktop_media_picker_views.cc index 8e6d36fd708f75..93f15b39921a07 100644 --- a/chrome/browser/ui/views/desktop_media_picker_views.cc +++ b/chrome/browser/ui/views/desktop_media_picker_views.cc @@ -10,7 +10,7 @@ #include "chrome/browser/ui/ash/ash_util.h" #include "content/public/browser/browser_thread.h" #include "grit/generated_resources.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/l10n/l10n_util.h" #include "ui/events/keycodes/keyboard_codes.h" #include "ui/gfx/canvas.h" diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index fc2166a55da298..5d332a5f5feb2f 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -145,7 +145,7 @@ #if defined(USE_AURA) #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/gfx/screen.h" #endif diff --git a/chrome/browser/ui/views/location_bar/star_view_browsertest.cc b/chrome/browser/ui/views/location_bar/star_view_browsertest.cc index 1275273b50775d..c39b2d5732ef56 100644 --- a/chrome/browser/ui/views/location_bar/star_view_browsertest.cc +++ b/chrome/browser/ui/views/location_bar/star_view_browsertest.cc @@ -22,7 +22,7 @@ #if defined(OS_WIN) #include "content/public/browser/web_contents_view.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif namespace { diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc index d24c993089d07d..e8fba69f72f985 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc @@ -25,7 +25,7 @@ #if defined(OS_WIN) #include "content/public/browser/web_contents_view.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif namespace { diff --git a/chrome/test/base/interactive_test_utils_win.cc b/chrome/test/base/interactive_test_utils_win.cc index af33eddfb9937d..3c973832b99cf7 100644 --- a/chrome/test/base/interactive_test_utils_win.cc +++ b/chrome/test/base/interactive_test_utils_win.cc @@ -16,7 +16,7 @@ #if defined(USE_AURA) #include "chrome/browser/ui/host_desktop.h" #include "chrome/test/base/interactive_test_utils_aura.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif namespace ui_test_utils { diff --git a/content/browser/media/capture/desktop_capture_device_aura.cc b/content/browser/media/capture/desktop_capture_device_aura.cc index ce58cb7296acf5..2c7d196531b121 100644 --- a/content/browser/media/capture/desktop_capture_device_aura.cc +++ b/content/browser/media/capture/desktop_capture_device_aura.cc @@ -18,8 +18,8 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/aura/env.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_observer.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/cursor/cursors_aura.h" #include "ui/compositor/compositor.h" #include "ui/compositor/dip_util.h" diff --git a/content/browser/renderer_host/compositor_resize_lock_aura.cc b/content/browser/renderer_host/compositor_resize_lock_aura.cc index 0f0b53c4c6173a..419b7b326b8a19 100644 --- a/content/browser/renderer_host/compositor_resize_lock_aura.cc +++ b/content/browser/renderer_host/compositor_resize_lock_aura.cc @@ -7,25 +7,26 @@ #include "base/debug/trace_event.h" #include "content/public/browser/browser_thread.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/compositor/compositor.h" namespace content { CompositorResizeLock::CompositorResizeLock( - aura::WindowEventDispatcher* dispatcher, + aura::WindowTreeHost* host, const gfx::Size new_size, bool defer_compositor_lock, const base::TimeDelta& timeout) : ResizeLock(new_size, defer_compositor_lock), - dispatcher_(dispatcher), + host_(host), weak_ptr_factory_(this), cancelled_(false) { - DCHECK(dispatcher_); + DCHECK(host_); TRACE_EVENT_ASYNC_BEGIN2("ui", "CompositorResizeLock", this, "width", expected_size().width(), "height", expected_size().height()); - dispatcher_->HoldPointerMoves(); + host_->dispatcher()->HoldPointerMoves(); BrowserThread::PostDelayedTask( BrowserThread::UI, FROM_HERE, @@ -52,7 +53,7 @@ void CompositorResizeLock::UnlockCompositor() { void CompositorResizeLock::LockCompositor() { ResizeLock::LockCompositor(); - compositor_lock_ = dispatcher_->host()->compositor()->GetCompositorLock(); + compositor_lock_ = host_->compositor()->GetCompositorLock(); } void CompositorResizeLock::CancelLock() { @@ -60,7 +61,7 @@ void CompositorResizeLock::CancelLock() { return; cancelled_ = true; UnlockCompositor(); - dispatcher_->ReleasePointerMoves(); + host_->dispatcher()->ReleasePointerMoves(); } } // namespace content diff --git a/content/browser/renderer_host/compositor_resize_lock_aura.h b/content/browser/renderer_host/compositor_resize_lock_aura.h index 211aabe3cdda88..1c2be391053ee7 100644 --- a/content/browser/renderer_host/compositor_resize_lock_aura.h +++ b/content/browser/renderer_host/compositor_resize_lock_aura.h @@ -11,7 +11,7 @@ #include "content/browser/compositor/resize_lock.h" namespace aura { -class WindowEventDispatcher; +class WindowTreeHost; } namespace ui { class CompositorLock; @@ -22,7 +22,7 @@ namespace content { // Used to prevent further resizes while a resize is pending. class CompositorResizeLock : public ResizeLock { public: - CompositorResizeLock(aura::WindowEventDispatcher* dispatcher, + CompositorResizeLock(aura::WindowTreeHost* host, const gfx::Size new_size, bool defer_compositor_lock, const base::TimeDelta& timeout); @@ -36,7 +36,7 @@ class CompositorResizeLock : public ResizeLock { void CancelLock(); private: - aura::WindowEventDispatcher* dispatcher_; + aura::WindowTreeHost* host_; scoped_refptr compositor_lock_; base::WeakPtrFactory weak_ptr_factory_; bool cancelled_; diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc index 5dad88d65634aa..1fd1e43f28fc41 100644 --- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc +++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc @@ -8,7 +8,8 @@ #include "content/browser/renderer_host/render_widget_host_view_aura.h" #include "content/browser/renderer_host/ui_events_helper.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" +#include "ui/events/event_processor.h" #include "ui/events/gestures/gesture_configuration.h" using blink::WebTouchEvent; @@ -36,7 +37,7 @@ void SyntheticGestureTargetAura::DispatchWebTouchEventToPlatform( end = events.end(); iter != end; ++iter) { (*iter)->ConvertLocationToTarget(window, host->window()); ui::EventDispatchDetails details = - host->dispatcher()->OnEventFromSource(*iter); + host->event_processor()->OnEventFromSource(*iter); if (details.dispatcher_destroyed) break; } @@ -54,7 +55,7 @@ void SyntheticGestureTargetAura::DispatchWebMouseWheelEventToPlatform( aura::Window* window = GetWindow(); wheel_event.ConvertLocationToTarget(window, window->GetRootWindow()); ui::EventDispatchDetails details = - window->GetHost()->dispatcher()->OnEventFromSource(&wheel_event); + window->GetHost()->event_processor()->OnEventFromSource(&wheel_event); if (details.dispatcher_destroyed) return; } @@ -121,7 +122,7 @@ void SyntheticGestureTargetAura::DispatchWebMouseEventToPlatform( aura::Window* window = GetWindow(); mouse_event.ConvertLocationToTarget(window, window->GetRootWindow()); ui::EventDispatchDetails details = - window->GetHost()->dispatcher()->OnEventFromSource(&mouse_event); + window->GetHost()->event_processor()->OnEventFromSource(&mouse_event); if (details.dispatcher_destroyed) return; } diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index cb11031448165f..0c1b0176a77352 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -62,6 +62,7 @@ #include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_observer.h" #include "ui/aura/window_tracker.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" #include "ui/base/hit_test.h" #include "ui/base/ime/input_method.h" @@ -748,7 +749,7 @@ scoped_ptr RenderWidgetHostViewAura::CreateResizeLock( bool defer_compositor_lock) { gfx::Size desired_size = window_->bounds().size(); return scoped_ptr(new CompositorResizeLock( - window_->GetHost()->dispatcher(), + window_->GetHost(), desired_size, defer_compositor_lock, base::TimeDelta::FromMilliseconds(kResizeLockTimeoutMs))); diff --git a/content/browser/web_contents/touch_editable_impl_aura.cc b/content/browser/web_contents/touch_editable_impl_aura.cc index 558d278e016187..df07a0016ceadb 100644 --- a/content/browser/web_contents/touch_editable_impl_aura.cc +++ b/content/browser/web_contents/touch_editable_impl_aura.cc @@ -15,7 +15,7 @@ #include "ui/aura/client/activation_client.h" #include "ui/aura/client/screen_position_client.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/ui_base_switches_util.h" #include "ui/gfx/range/range.h" diff --git a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc index c3ba504a6024ab..876e3db4aa3d37 100644 --- a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc +++ b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc @@ -21,7 +21,7 @@ #include "content/test/content_browser_test_utils.h" #include "ui/aura/test/event_generator.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/ui_base_switches.h" #include "ui/compositor/scoped_animation_duration_scale_mode.h" #include "ui/events/event_utils.h" diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index d07908a1f8ea16..361f43c0817197 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -49,8 +49,8 @@ #include "ui/aura/client/window_tree_client.h" #include "ui/aura/env.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_observer.h" +#include "ui/aura/window_tree_host.h" #include "ui/aura/window_tree_host_observer.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/custom_data_helper.h" diff --git a/content/shell/browser/shell_download_manager_delegate.cc b/content/shell/browser/shell_download_manager_delegate.cc index 31f9d94f519a70..bd5a294efd3705 100644 --- a/content/shell/browser/shell_download_manager_delegate.cc +++ b/content/shell/browser/shell_download_manager_delegate.cc @@ -30,7 +30,7 @@ #if defined(OS_WIN) #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #endif namespace content { diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc index 7831adca323f79..38a61d3e29c280 100644 --- a/ui/app_list/views/app_list_view.cc +++ b/ui/app_list/views/app_list_view.cc @@ -37,7 +37,7 @@ #if defined(USE_AURA) #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #if defined(OS_WIN) #include "ui/base/win/shell.h" #endif diff --git a/ui/aura/client/default_capture_client.cc b/ui/aura/client/default_capture_client.cc index 3cde70319d46d8..69632d8a5be158 100644 --- a/ui/aura/client/default_capture_client.cc +++ b/ui/aura/client/default_capture_client.cc @@ -6,6 +6,7 @@ #include "ui/aura/window.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" namespace aura { namespace client { diff --git a/ui/aura/test/aura_test_helper.h b/ui/aura/test/aura_test_helper.h index ee176934609be7..f79ca76782c32e 100644 --- a/ui/aura/test/aura_test_helper.h +++ b/ui/aura/test/aura_test_helper.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" namespace base { class MessageLoopForUI; diff --git a/ui/aura/test/ui_controls_factory_aura.h b/ui/aura/test/ui_controls_factory_aura.h index 777f0d3661791b..b6752221a09e78 100644 --- a/ui/aura/test/ui_controls_factory_aura.h +++ b/ui/aura/test/ui_controls_factory_aura.h @@ -8,13 +8,11 @@ #include "ui/base/test/ui_controls_aura.h" namespace aura { -class WindowEventDispatcher; +class WindowTreeHost; namespace test { -// TODO(beng): Should be changed to take a WindowTreeHost. -ui_controls::UIControlsAura* CreateUIControlsAura( - WindowEventDispatcher* dispatcher); +ui_controls::UIControlsAura* CreateUIControlsAura(WindowTreeHost* host); } // namespace test } // namespace aura diff --git a/ui/aura/test/ui_controls_factory_aurawin.cc b/ui/aura/test/ui_controls_factory_aurawin.cc index a505fbba831230..717aea5ee607d7 100644 --- a/ui/aura/test/ui_controls_factory_aurawin.cc +++ b/ui/aura/test/ui_controls_factory_aurawin.cc @@ -7,7 +7,7 @@ #include "base/message_loop/message_loop.h" #include "ui/aura/test/ui_controls_factory_aura.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/test/ui_controls_aura.h" #include "ui/base/test/ui_controls_internal_win.h" @@ -84,7 +84,7 @@ class UIControlsWin : public UIControlsAura { } // namespace -UIControlsAura* CreateUIControlsAura(WindowEventDispatcher* dispatcher) { +UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { return new UIControlsWin(); } diff --git a/ui/aura/test/ui_controls_factory_aurax11.cc b/ui/aura/test/ui_controls_factory_aurax11.cc index 452acabc4ecd2c..e763c8e2f5e11c 100644 --- a/ui/aura/test/ui_controls_factory_aurax11.cc +++ b/ui/aura/test/ui_controls_factory_aurax11.cc @@ -10,7 +10,7 @@ #include "ui/aura/env.h" #include "ui/aura/test/ui_controls_factory_aura.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/test/ui_controls_aura.h" #include "ui/base/x/x11_util.h" #include "ui/compositor/dip_util.h" @@ -80,7 +80,7 @@ bool Matcher(const base::NativeEvent& event) { class UIControlsX11 : public UIControlsAura { public: - UIControlsX11(WindowEventDispatcher* dispatcher) : dispatcher_(dispatcher) { + UIControlsX11(WindowTreeHost* host) : host_(host) { } virtual bool SendKeyPress(gfx::NativeWindow window, @@ -113,11 +113,11 @@ class UIControlsX11 : public UIControlsAura { xevent.xkey.keycode = XKeysymToKeycode(gfx::GetXDisplay(), ui::XKeysymForWindowsKeyCode(key, shift)); - dispatcher_->host()->PostNativeEvent(&xevent); + host_->PostNativeEvent(&xevent); // Send key release events. xevent.xkey.type = KeyRelease; - dispatcher_->host()->PostNativeEvent(&xevent); + host_->PostNativeEvent(&xevent); if (alt) UnmaskAndSetKeycodeThenSend(&xevent, Mod1Mask, XK_Alt_L); if (shift) @@ -138,19 +138,19 @@ class UIControlsX11 : public UIControlsAura { const base::Closure& closure) OVERRIDE { gfx::Point root_location(screen_x, screen_y); aura::client::ScreenPositionClient* screen_position_client = - aura::client::GetScreenPositionClient(dispatcher_->window()); + aura::client::GetScreenPositionClient(host_->window()); if (screen_position_client) { - screen_position_client->ConvertPointFromScreen(dispatcher_->window(), + screen_position_client->ConvertPointFromScreen(host_->window(), &root_location); } gfx::Point root_current_location; - dispatcher_->host()->QueryMouseLocation(&root_current_location); - dispatcher_->host()->ConvertPointFromHost(&root_current_location); + host_->QueryMouseLocation(&root_current_location); + host_->ConvertPointFromHost(&root_current_location); if (root_location != root_current_location && button_down_mask == 0) { // Move the cursor because EnterNotify/LeaveNotify are generated with the // current mouse position as a result of XGrabPointer() - dispatcher_->window()->MoveCursorTo(root_location); + host_->window()->MoveCursorTo(root_location); } else { XEvent xevent = {0}; XMotionEvent* xmotion = &xevent.xmotion; @@ -159,8 +159,8 @@ class UIControlsX11 : public UIControlsAura { xmotion->y = root_location.y(); xmotion->state = button_down_mask; xmotion->same_screen = True; - // WindowEventDispatcher will take care of other necessary fields. - dispatcher_->host()->PostNativeEvent(&xevent); + // WindowTreeHost will take care of other necessary fields. + host_->PostNativeEvent(&xevent); } RunClosureAfterAllPendingUIEvents(closure); return true; @@ -176,9 +176,9 @@ class UIControlsX11 : public UIControlsAura { XButtonEvent* xbutton = &xevent.xbutton; gfx::Point mouse_loc = aura::Env::GetInstance()->last_mouse_location(); aura::client::ScreenPositionClient* screen_position_client = - aura::client::GetScreenPositionClient(dispatcher_->window()); + aura::client::GetScreenPositionClient(host_->window()); if (screen_position_client) { - screen_position_client->ConvertPointFromScreen(dispatcher_->window(), + screen_position_client->ConvertPointFromScreen(host_->window(), &mouse_loc); } xbutton->x = mouse_loc.x(); @@ -201,12 +201,12 @@ class UIControlsX11 : public UIControlsAura { // WindowEventDispatcher will take care of other necessary fields. if (state & DOWN) { xevent.xbutton.type = ButtonPress; - dispatcher_->host()->PostNativeEvent(&xevent); + host_->PostNativeEvent(&xevent); button_down_mask |= xbutton->state; } if (state & UP) { xevent.xbutton.type = ButtonRelease; - dispatcher_->host()->PostNativeEvent(&xevent); + host_->PostNativeEvent(&xevent); button_down_mask = (button_down_mask | xbutton->state) ^ xbutton->state; } RunClosureAfterAllPendingUIEvents(closure); @@ -228,7 +228,7 @@ class UIControlsX11 : public UIControlsAura { marker_event->xclient.format = 8; } marker_event->xclient.message_type = MarkerEventAtom(); - dispatcher_->host()->PostNativeEvent(marker_event); + host_->PostNativeEvent(marker_event); new EventWaiter(closure, &Matcher); } private: @@ -237,7 +237,7 @@ class UIControlsX11 : public UIControlsAura { unsigned int mask) { xevent->xkey.keycode = XKeysymToKeycode(gfx::GetXDisplay(), keysym); - dispatcher_->host()->PostNativeEvent(xevent); + host_->PostNativeEvent(xevent); xevent->xkey.state |= mask; } @@ -247,18 +247,18 @@ class UIControlsX11 : public UIControlsAura { xevent->xkey.state ^= mask; xevent->xkey.keycode = XKeysymToKeycode(gfx::GetXDisplay(), keysym); - dispatcher_->host()->PostNativeEvent(xevent); + host_->PostNativeEvent(xevent); } - WindowEventDispatcher* dispatcher_; + WindowTreeHost* host_; DISALLOW_COPY_AND_ASSIGN(UIControlsX11); }; } // namespace -UIControlsAura* CreateUIControlsAura(WindowEventDispatcher* dispatcher) { - return new UIControlsX11(dispatcher); +UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { + return new UIControlsX11(host); } } // namespace test diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc index 82d1ef6a4679af..170d51345eabd2 100644 --- a/ui/aura/window_event_dispatcher.cc +++ b/ui/aura/window_event_dispatcher.cc @@ -299,9 +299,17 @@ void WindowEventDispatcher::OnCursorMovedToRootLocation( //////////////////////////////////////////////////////////////////////////////// // WindowEventDispatcher, private: +Window* WindowEventDispatcher::window() { + return host_->window(); +} + +const Window* WindowEventDispatcher::window() const { + return host_->window(); +} + void WindowEventDispatcher::TransformEventForDeviceScaleFactor( ui::LocatedEvent* event) { - event->UpdateForRootTransform(host()->GetInverseRootTransform()); + event->UpdateForRootTransform(host_->GetInverseRootTransform()); } ui::EventDispatchDetails WindowEventDispatcher::DispatchMouseEnterOrExit( @@ -637,7 +645,7 @@ ui::EventDispatchDetails WindowEventDispatcher::SynthesizeMouseMoveEvent() { if (!window()->bounds().Contains(root_mouse_location)) return details; gfx::Point host_mouse_location = root_mouse_location; - host()->ConvertPointToHost(&host_mouse_location); + host_->ConvertPointToHost(&host_mouse_location); ui::MouseEvent event(ui::ET_MOUSE_MOVED, host_mouse_location, host_mouse_location, diff --git a/ui/aura/window_event_dispatcher.h b/ui/aura/window_event_dispatcher.h index 213077474962b9..c7826490e424b9 100644 --- a/ui/aura/window_event_dispatcher.h +++ b/ui/aura/window_event_dispatcher.h @@ -15,7 +15,6 @@ #include "base/message_loop/message_loop.h" #include "ui/aura/aura_export.h" #include "ui/aura/client/capture_delegate.h" -#include "ui/aura/window_tree_host.h" #include "ui/base/cursor/cursor.h" #include "ui/events/event_constants.h" #include "ui/events/event_processor.h" @@ -43,6 +42,7 @@ namespace aura { class RootWindowObserver; class TestScreen; class WindowTargeter; +class WindowTreeHost; // WindowEventDispatcher orchestrates event dispatch within a window tree // owned by WindowTreeHost. WTH also owns the WED. @@ -55,13 +55,6 @@ class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor, explicit WindowEventDispatcher(WindowTreeHost* host); virtual ~WindowEventDispatcher(); - Window* window() { return host()->window(); } - const Window* window() const { return host()->window(); } - WindowTreeHost* host() { - return const_cast( - const_cast(this)->host()); - } - const WindowTreeHost* host() const { return host_; } Window* mouse_pressed_handler() { return mouse_pressed_handler_; } Window* mouse_moved_handler() { return mouse_moved_handler_; } @@ -150,6 +143,9 @@ class AURA_EXPORT WindowEventDispatcher : public ui::EventProcessor, // across root windows. }; + Window* window(); + const Window* window() const; + // Updates the event with the appropriate transform for the device scale // factor. The WindowEventDispatcher dispatches events in the physical pixel // coordinate. But the event processing from WindowEventDispatcher onwards diff --git a/ui/aura/window_targeter.cc b/ui/aura/window_targeter.cc index c0c194ecf8a256..ad6369c3691f43 100644 --- a/ui/aura/window_targeter.cc +++ b/ui/aura/window_targeter.cc @@ -10,6 +10,7 @@ #include "ui/aura/window.h" #include "ui/aura/window_delegate.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/events/event_target.h" namespace aura { @@ -56,7 +57,7 @@ ui::EventTarget* WindowTargeter::FindTargetForEvent(ui::EventTarget* root, // from here. Instead, dispatch the event through the // WindowEventDispatcher that owns |target|. ui::EventDispatchDetails details ALLOW_UNUSED = - target->GetHost()->dispatcher()->OnEventFromSource(event); + target->GetHost()->event_processor()->OnEventFromSource(event); target = NULL; } } diff --git a/ui/keyboard/DEPS b/ui/keyboard/DEPS index ec5b911c352815..d8ce9fb4ce22f6 100644 --- a/ui/keyboard/DEPS +++ b/ui/keyboard/DEPS @@ -5,6 +5,7 @@ include_rules = [ "+ui/aura", "+ui/base", "+ui/compositor", + "+ui/events", "+ui/gfx", "+ui/gl/gl_surface.h", # To initialize GL for tests. "+ui/test", diff --git a/ui/keyboard/keyboard_ui_handler.cc b/ui/keyboard/keyboard_ui_handler.cc index c0873b809211f8..88f47514eb7c65 100644 --- a/ui/keyboard/keyboard_ui_handler.cc +++ b/ui/keyboard/keyboard_ui_handler.cc @@ -14,7 +14,7 @@ #include "content/public/browser/web_ui.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/ime/input_method.h" #include "ui/base/ime/text_input_client.h" #include "ui/keyboard/keyboard_controller.h" @@ -115,9 +115,9 @@ void KeyboardUIHandler::HandleSendKeyEventMessage( return; } - aura::WindowEventDispatcher* dispatcher = web_ui()->GetWebContents()-> - GetView()->GetNativeView()->GetHost()->dispatcher(); - if (!dispatcher) { + aura::WindowTreeHost* host = + web_ui()->GetWebContents()->GetView()->GetNativeView()->GetHost(); + if (!host) { LOG(ERROR) << "sendKeyEvent failed: no dispatcher"; return; } @@ -127,7 +127,7 @@ void KeyboardUIHandler::HandleSendKeyEventMessage( key_code, key_name, modifiers, - dispatcher)) { + host)) { LOG(ERROR) << "sendKeyEvent failed"; } } diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc index b0ab46715ef0a9..d9b060562a7158 100644 --- a/ui/keyboard/keyboard_util.cc +++ b/ui/keyboard/keyboard_util.cc @@ -14,9 +14,10 @@ #include "grit/keyboard_resources.h" #include "grit/keyboard_resources_map.h" #include "ui/aura/client/aura_constants.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/ime/input_method.h" #include "ui/base/ime/text_input_client.h" +#include "ui/events/event_processor.h" #include "ui/keyboard/keyboard_switches.h" #include "url/gurl.h" @@ -26,11 +27,12 @@ const char kKeyDown[] ="keydown"; const char kKeyUp[] = "keyup"; void SendProcessKeyEvent(ui::EventType type, - aura::WindowEventDispatcher* dispatcher) { + aura::WindowTreeHost* host) { ui::TranslatedKeyEvent event(type == ui::ET_KEY_PRESSED, ui::VKEY_PROCESSKEY, ui::EF_NONE); - ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&event); + ui::EventDispatchDetails details = + host->event_processor()->OnEventFromSource(&event); CHECK(!details.dispatcher_destroyed); } @@ -95,8 +97,8 @@ bool InsertText(const base::string16& text, aura::Window* root_window) { // ui::TextInputClient from that (see above in InsertText()). bool MoveCursor(int swipe_direction, int modifier_flags, - aura::WindowEventDispatcher* dispatcher) { - if (!dispatcher) + aura::WindowTreeHost* host) { + if (!host) return false; ui::KeyboardCode codex = ui::VKEY_UNKNOWN; ui::KeyboardCode codey = ui::VKEY_UNKNOWN; @@ -114,10 +116,10 @@ bool MoveCursor(int swipe_direction, if (codex != ui::VKEY_UNKNOWN) { ui::KeyEvent press_event(ui::ET_KEY_PRESSED, codex, modifier_flags, 0); ui::EventDispatchDetails details = - dispatcher->OnEventFromSource(&press_event); + host->event_processor()->OnEventFromSource(&press_event); CHECK(!details.dispatcher_destroyed); ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codex, modifier_flags, 0); - details = dispatcher->OnEventFromSource(&release_event); + details = host->event_processor()->OnEventFromSource(&release_event); CHECK(!details.dispatcher_destroyed); } @@ -125,10 +127,10 @@ bool MoveCursor(int swipe_direction, if (codey != ui::VKEY_UNKNOWN) { ui::KeyEvent press_event(ui::ET_KEY_PRESSED, codey, modifier_flags, 0); ui::EventDispatchDetails details = - dispatcher->OnEventFromSource(&press_event); + host->event_processor()->OnEventFromSource(&press_event); CHECK(!details.dispatcher_destroyed); ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codey, modifier_flags, 0); - details = dispatcher->OnEventFromSource(&release_event); + details = host->event_processor()->OnEventFromSource(&release_event); CHECK(!details.dispatcher_destroyed); } return true; @@ -139,7 +141,7 @@ bool SendKeyEvent(const std::string type, int key_code, std::string key_name, int modifiers, - aura::WindowEventDispatcher* dispatcher) { + aura::WindowTreeHost* host) { ui::EventType event_type = ui::ET_UNKNOWN; if (type == kKeyDown) event_type = ui::ET_KEY_PRESSED; @@ -154,16 +156,16 @@ bool SendKeyEvent(const std::string type, // Handling of special printable characters (e.g. accented characters) for // which there is no key code. if (event_type == ui::ET_KEY_RELEASED) { - ui::InputMethod* input_method = dispatcher->window()->GetProperty( + ui::InputMethod* input_method = host->window()->GetProperty( aura::client::kRootWindowInputMethodKey); if (!input_method) return false; ui::TextInputClient* tic = input_method->GetTextInputClient(); - SendProcessKeyEvent(ui::ET_KEY_PRESSED, dispatcher); + SendProcessKeyEvent(ui::ET_KEY_PRESSED, host); tic->InsertChar(static_cast(key_value), ui::EF_NONE); - SendProcessKeyEvent(ui::ET_KEY_RELEASED, dispatcher); + SendProcessKeyEvent(ui::ET_KEY_RELEASED, host); } } else { if (event_type == ui::ET_KEY_RELEASED) { @@ -182,7 +184,8 @@ bool SendKeyEvent(const std::string type, } ui::KeyEvent event(event_type, code, key_name, modifiers, false); - ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&event); + ui::EventDispatchDetails details = + host->event_processor()->OnEventFromSource(&event); CHECK(!details.dispatcher_destroyed); } return true; diff --git a/ui/keyboard/keyboard_util.h b/ui/keyboard/keyboard_util.h index f2de1e8a1c6525..b26742267eaee8 100644 --- a/ui/keyboard/keyboard_util.h +++ b/ui/keyboard/keyboard_util.h @@ -15,7 +15,7 @@ struct GritResourceMap; namespace aura { -class WindowEventDispatcher; +class WindowTreeHost; } class GURL; @@ -64,7 +64,7 @@ KEYBOARD_EXPORT bool InsertText(const base::string16& text, // successfully moved according to |swipe_direction|. KEYBOARD_EXPORT bool MoveCursor(int swipe_direction, int modifier_flags, - aura::WindowEventDispatcher* dispatcher); + aura::WindowTreeHost* host); // Sends a fabricated key event, where |type| is the event type, |key_value| // is the unicode value of the character, |key_code| is the legacy key code @@ -77,7 +77,7 @@ KEYBOARD_EXPORT bool SendKeyEvent(std::string type, int key_code, std::string key_name, int modifiers, - aura::WindowEventDispatcher* dispatcher); + aura::WindowTreeHost* host); // Marks that the keyboard load has started. This is used to measure the time it // takes to fully load the keyboard. This should be called before diff --git a/ui/views/corewm/desktop_capture_controller_unittest.cc b/ui/views/corewm/desktop_capture_controller_unittest.cc index 3bf5f9e6897752..ad6d849e03ebb9 100644 --- a/ui/views/corewm/desktop_capture_controller_unittest.cc +++ b/ui/views/corewm/desktop_capture_controller_unittest.cc @@ -10,6 +10,7 @@ #include "ui/aura/test/event_generator.h" #include "ui/aura/test/test_window_delegate.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_paths.h" #include "ui/events/event.h" diff --git a/ui/views/corewm/tooltip_aura.cc b/ui/views/corewm/tooltip_aura.cc index b4c0af2c34c98f..5b8da6a6d41c3c 100644 --- a/ui/views/corewm/tooltip_aura.cc +++ b/ui/views/corewm/tooltip_aura.cc @@ -7,7 +7,7 @@ #include "base/command_line.h" #include "base/strings/string_split.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/screen.h" #include "ui/gfx/text_elider.h" diff --git a/ui/views/event_utils_aura.cc b/ui/views/event_utils_aura.cc index 42b12c1667376f..5e93e8e55731f2 100644 --- a/ui/views/event_utils_aura.cc +++ b/ui/views/event_utils_aura.cc @@ -8,6 +8,7 @@ #include "base/memory/scoped_ptr.h" #include "ui/aura/client/screen_position_client.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/events/event.h" #include "ui/gfx/point.h" #include "ui/views/views_delegate.h" diff --git a/ui/views/widget/desktop_aura/desktop_capture_client.cc b/ui/views/widget/desktop_aura/desktop_capture_client.cc index 3367f860912a41..fe9090d24a260f 100644 --- a/ui/views/widget/desktop_aura/desktop_capture_client.cc +++ b/ui/views/widget/desktop_aura/desktop_capture_client.cc @@ -6,6 +6,7 @@ #include "ui/aura/window.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" namespace views { diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc index e7101ac8ce1a95..0fcebdc63b6a8e 100644 --- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc +++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc @@ -13,7 +13,7 @@ #include "ui/aura/client/drag_drop_client.h" #include "ui/aura/client/drag_drop_delegate.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/dragdrop/drag_drop_types.h" #include "ui/base/dragdrop/drop_target_event.h" #include "ui/base/dragdrop/os_exchange_data.h" diff --git a/ui/views/widget/desktop_aura/desktop_drop_target_win.cc b/ui/views/widget/desktop_aura/desktop_drop_target_win.cc index 26eeb89d966425..f1409f8ad255dd 100644 --- a/ui/views/widget/desktop_aura/desktop_drop_target_win.cc +++ b/ui/views/widget/desktop_aura/desktop_drop_target_win.cc @@ -8,7 +8,7 @@ #include "ui/aura/client/drag_drop_client.h" #include "ui/aura/client/drag_drop_delegate.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/dragdrop/drag_drop_types.h" #include "ui/base/dragdrop/drop_target_event.h" #include "ui/base/dragdrop/os_exchange_data_provider_win.h" diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc index bbb721505ceb12..0caeab24f8e7c9 100644 --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc @@ -13,7 +13,6 @@ #include "ui/aura/client/focus_client.h" #include "ui/aura/client/window_tree_client.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_observer.h" #include "ui/aura/window_property.h" #include "ui/aura/window_tree_host.h" diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc index 9b4a1571ba679e..6752cfbd1b0300 100644 --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc @@ -9,7 +9,7 @@ #include "ui/aura/client/dispatcher_client.h" #include "ui/aura/test/test_window_delegate.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/views/test/views_test_base.h" #include "ui/views/widget/widget.h" diff --git a/ui/views/widget/desktop_aura/desktop_screen_position_client.cc b/ui/views/widget/desktop_aura/desktop_screen_position_client.cc index b5187f5432e9e8..34c8553e2512a7 100644 --- a/ui/views/widget/desktop_aura/desktop_screen_position_client.cc +++ b/ui/views/widget/desktop_aura/desktop_screen_position_client.cc @@ -4,7 +4,7 @@ #include "ui/views/widget/desktop_aura/desktop_screen_position_client.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/gfx/display.h" #include "ui/gfx/point_conversions.h" #include "ui/gfx/screen.h" diff --git a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc index 072d1ef792d2b9..482986b9f3f3d3 100644 --- a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc +++ b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc @@ -12,7 +12,7 @@ #include "base/run_loop.h" #include "ui/aura/env.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/x/x11_util.h" #include "ui/events/event.h" #include "ui/gfx/screen.h" @@ -41,7 +41,7 @@ namespace views { X11DesktopWindowMoveClient::X11DesktopWindowMoveClient() : move_loop_(this), - dispatcher_(NULL) { + host_(NULL) { } X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {} @@ -50,7 +50,7 @@ void X11DesktopWindowMoveClient::OnMouseMovement(XMotionEvent* event) { gfx::Point cursor_point(event->x_root, event->y_root); gfx::Point system_loc = cursor_point - window_offset_; - gfx::Rect target_rect(system_loc, dispatcher_->host()->GetBounds().size()); + gfx::Rect target_rect(system_loc, host_->GetBounds().size()); window_move_timer_.Start( FROM_HERE, @@ -65,7 +65,7 @@ void X11DesktopWindowMoveClient::OnMouseReleased() { } void X11DesktopWindowMoveClient::OnMoveLoopEnded() { - dispatcher_ = NULL; + host_ = NULL; } //////////////////////////////////////////////////////////////////////////////// @@ -76,10 +76,9 @@ aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop( const gfx::Vector2d& drag_offset, aura::client::WindowMoveSource move_source) { window_offset_ = drag_offset; - dispatcher_ = source->GetHost()->dispatcher(); + host_ = source->GetHost(); - bool success = move_loop_.RunMoveLoop(source, - dispatcher_->host()->last_cursor()); + bool success = move_loop_.RunMoveLoop(source, host_->last_cursor()); return success ? aura::client::MOVE_SUCCESSFUL : aura::client::MOVE_CANCELED; } @@ -92,7 +91,7 @@ void X11DesktopWindowMoveClient::EndMoveLoop() { // DesktopWindowTreeHostLinux, private: void X11DesktopWindowMoveClient::SetHostBounds(const gfx::Rect& rect) { - dispatcher_->host()->SetBounds(rect); + host_->SetBounds(rect); } } // namespace views diff --git a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h index 935ffcd6e2fb4d..12e5928c0fe654 100644 --- a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h +++ b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h @@ -18,7 +18,7 @@ #include "ui/views/widget/desktop_aura/x11_whole_screen_move_loop_delegate.h" namespace aura { -class WindowEventDispatcher; +class WindowTreeHost; } namespace gfx { @@ -55,7 +55,7 @@ class VIEWS_EXPORT X11DesktopWindowMoveClient : // We need to keep track of this so we can actually move it when reacting to // mouse events. - aura::WindowEventDispatcher* dispatcher_; + aura::WindowTreeHost* host_; // Our cursor offset from the top left window origin when the drag // started. Used to calculate the window's new bounds relative to the current diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.cc b/ui/views/widget/desktop_aura/x11_window_event_filter.cc index 9637cfe6964c43..9cb6834313d55b 100644 --- a/ui/views/widget/desktop_aura/x11_window_event_filter.cc +++ b/ui/views/widget/desktop_aura/x11_window_event_filter.cc @@ -12,6 +12,7 @@ #include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" #include "ui/aura/window_delegate.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/hit_test.h" #include "ui/events/event.h" #include "ui/events/event_utils.h" diff --git a/ui/views/widget/native_widget_aura_unittest.cc b/ui/views/widget/native_widget_aura_unittest.cc index 1ecc8e99bcfb9a..c53ce4d5186fb7 100644 --- a/ui/views/widget/native_widget_aura_unittest.cc +++ b/ui/views/widget/native_widget_aura_unittest.cc @@ -13,7 +13,7 @@ #include "ui/aura/env.h" #include "ui/aura/layout_manager.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/events/event.h" #include "ui/gfx/screen.h" #include "ui/views/layout/fill_layout.h" diff --git a/ui/views/widget/tooltip_manager_aura.cc b/ui/views/widget/tooltip_manager_aura.cc index 8208063844e711..fa04cb0c2e2786 100644 --- a/ui/views/widget/tooltip_manager_aura.cc +++ b/ui/views/widget/tooltip_manager_aura.cc @@ -8,6 +8,7 @@ #include "ui/aura/client/screen_position_client.h" #include "ui/aura/client/tooltip_client.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/rect.h" #include "ui/gfx/screen.h" diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc index 31554bd72e7420..232e88a5240f4c 100644 --- a/ui/views/widget/widget_interactive_uitest.cc +++ b/ui/views/widget/widget_interactive_uitest.cc @@ -10,9 +10,10 @@ #include "ui/aura/client/focus_client.h" #include "ui/aura/env.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_paths.h" +#include "ui/events/event_processor.h" #include "ui/gfx/native_widget_types.h" #include "ui/gl/gl_surface.h" #include "ui/views/test/widget_test.h" @@ -801,7 +802,7 @@ TEST_F(WidgetCaptureTest, MAYBE_MouseEventDispatchedToRightWindow) { ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(), ui::EF_NONE, ui::EF_NONE); ui::EventDispatchDetails details = widget1.GetNativeWindow()-> - GetHost()->dispatcher()->OnEventFromSource(&mouse_event); + GetHost()->event_processor()->OnEventFromSource(&mouse_event); ASSERT_FALSE(details.dispatcher_destroyed); EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); diff --git a/ui/views/win/hwnd_util_aurawin.cc b/ui/views/win/hwnd_util_aurawin.cc index 76e6e90cc48d08..37dca58f774e20 100644 --- a/ui/views/win/hwnd_util_aurawin.cc +++ b/ui/views/win/hwnd_util_aurawin.cc @@ -5,7 +5,7 @@ #include "ui/views/win/hwnd_util.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/views/widget/widget.h" namespace views { diff --git a/ui/wm/core/capture_controller.cc b/ui/wm/core/capture_controller.cc index cea55baea35cba..b3d8620c05e4fd 100644 --- a/ui/wm/core/capture_controller.cc +++ b/ui/wm/core/capture_controller.cc @@ -6,6 +6,7 @@ #include "ui/aura/window.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" namespace wm { diff --git a/ui/wm/core/input_method_event_filter.cc b/ui/wm/core/input_method_event_filter.cc index 6006a93440e1d2..4854a1b5f99239 100644 --- a/ui/wm/core/input_method_event_filter.cc +++ b/ui/wm/core/input_method_event_filter.cc @@ -5,7 +5,7 @@ #include "ui/wm/core/input_method_event_filter.h" #include "ui/aura/client/aura_constants.h" -#include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/ime/input_method.h" #include "ui/base/ime/input_method_factory.h" #include "ui/events/event.h"