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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc

Issue 147203004: aura: Remove event-dispatch methods from WindowTreeHostDelegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
index 76cc59bf4a9dcdfa45c86c7de9b28076fe6a8c15..51736b7ee906fc427abbed3f04331a14ed55c17d 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -917,6 +917,13 @@ void DesktopWindowTreeHostX11::PrepareForShutdown() {
}
////////////////////////////////////////////////////////////////////////////////
+// DesktopWindowTreeHostX11, ui::EventSource implementation:
+
+ui::EventProcessor* DesktopWindowTreeHostX11::GetEventProcessor() {
+ return delegate_->GetEventProcessor();
+}
+
+////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostX11, private:
void DesktopWindowTreeHostX11::InitX11Window(
@@ -1112,13 +1119,13 @@ void DesktopWindowTreeHostX11::OnCaptureReleased() {
void DesktopWindowTreeHostX11::DispatchMouseEvent(ui::MouseEvent* event) {
if (!g_current_capture || g_current_capture == this) {
- delegate_->OnHostMouseEvent(event);
+ SendEventToProcessor(event);
} else {
// Another DesktopWindowTreeHostX11 has installed itself as
// capture. Translate the event's location and dispatch to the other.
event->ConvertLocationToTarget(root_window_->window(),
g_current_capture->root_window_->window());
- g_current_capture->delegate_->OnHostMouseEvent(event);
+ g_current_capture->SendEventToProcessor(event);
}
}
@@ -1127,9 +1134,9 @@ void DesktopWindowTreeHostX11::DispatchTouchEvent(ui::TouchEvent* event) {
event->type() == ui::ET_TOUCH_PRESSED) {
event->ConvertLocationToTarget(root_window_->window(),
g_current_capture->root_window_->window());
- g_current_capture->delegate_->OnHostTouchEvent(event);
+ g_current_capture->SendEventToProcessor(event);
} else {
- delegate_->OnHostTouchEvent(event);
+ SendEventToProcessor(event);
}
}
@@ -1259,12 +1266,12 @@ bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
}
case KeyPress: {
ui::KeyEvent keydown_event(xev, false);
- delegate_->OnHostKeyEvent(&keydown_event);
+ SendEventToProcessor(&keydown_event);
break;
}
case KeyRelease: {
ui::KeyEvent keyup_event(xev, false);
- delegate_->OnHostKeyEvent(&keyup_event);
+ SendEventToProcessor(&keyup_event);
break;
}
case ButtonPress: {
@@ -1412,7 +1419,7 @@ bool DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
case ui::ET_SCROLL_FLING_CANCEL:
case ui::ET_SCROLL: {
ui::ScrollEvent scrollev(xev);
- delegate_->OnHostScrollEvent(&scrollev);
+ SendEventToProcessor(&scrollev);
break;
}
case ui::ET_UNKNOWN:
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.h ('k') | ui/views/widget/native_widget_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698