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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_win.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_win.cc
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
index f3436add5ccc92ffdc4bc1a8c3c9ef5a34b432a9..fb7950e161bb48c3eed8f29672af2904d5b699f8 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
@@ -577,6 +577,14 @@ void DesktopWindowTreeHostWin::OnDeviceScaleFactorChanged(
void DesktopWindowTreeHostWin::PrepareForShutdown() {
}
+
+////////////////////////////////////////////////////////////////////////////////
+// DesktopWindowTreeHostWin, ui::EventSource implementation:
+
+ui::EventProcessor* DesktopWindowTreeHostWin::GetEventProcessor() {
+ return delegate_->GetEventProcessor();
+}
+
////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostWin, aura::AnimationHost implementation:
@@ -846,7 +854,8 @@ void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) {
}
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
- return delegate_->OnHostMouseEvent(const_cast<ui::MouseEvent*>(&event));
+ SendEventToProcessor(const_cast<ui::MouseEvent*>(&event));
+ return event.handled();
}
bool DesktopWindowTreeHostWin::HandleKeyEvent(const ui::KeyEvent& event) {
@@ -856,7 +865,8 @@ bool DesktopWindowTreeHostWin::HandleKeyEvent(const ui::KeyEvent& event) {
bool DesktopWindowTreeHostWin::HandleUntranslatedKeyEvent(
const ui::KeyEvent& event) {
ui::KeyEvent duplicate_event(event);
- return delegate_->OnHostKeyEvent(&duplicate_event);
+ SendEventToProcessor(&duplicate_event);
+ return duplicate_event.handled();
}
void DesktopWindowTreeHostWin::HandleTouchEvent(
@@ -881,12 +891,11 @@ void DesktopWindowTreeHostWin::HandleTouchEvent(
static_cast<View*>(NULL));
target_event.set_location(gfx::Point(target_location));
target_event.set_root_location(target_event.location());
- target->delegate_->OnHostTouchEvent(&target_event);
+ target->SendEventToProcessor(&target_event);
return;
}
}
- delegate_->OnHostTouchEvent(
- const_cast<ui::TouchEvent*>(&event));
+ SendEventToProcessor(const_cast<ui::TouchEvent*>(&event));
}
bool DesktopWindowTreeHostWin::HandleIMEMessage(UINT message,
@@ -954,7 +963,8 @@ void DesktopWindowTreeHostWin::PostHandleMSG(UINT message,
bool DesktopWindowTreeHostWin::HandleScrollEvent(
const ui::ScrollEvent& event) {
- return delegate_->OnHostScrollEvent(const_cast<ui::ScrollEvent*>(&event));
+ SendEventToProcessor(const_cast<ui::ScrollEvent*>(&event));
+ return event.handled();
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698