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

Unified Diff: trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 188843003: Revert 255368 "Clean up WindowEventDispatcher some more." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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
« no previous file with comments | « trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
===================================================================
--- trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (revision 255398)
+++ trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (working copy)
@@ -183,7 +183,7 @@
void DesktopWindowTreeHostX11::HandleNativeWidgetActivationChanged(
bool active) {
if (active) {
- OnHostActivated();
+ delegate_->OnHostActivated();
open_windows().remove(xwindow_);
open_windows().insert(open_windows().begin(), xwindow_);
}
@@ -237,6 +237,7 @@
dispatcher_->window()->SetProperty(kViewsWindowForRootWindow,
content_window_);
dispatcher_->window()->SetProperty(kHostForRootWindow, this);
+ delegate_ = dispatcher_;
// Ensure that the X11DesktopHandler exists so that it dispatches activation
// messages to us.
@@ -919,7 +920,7 @@
// DesktopWindowTreeHostX11, ui::EventSource implementation:
ui::EventProcessor* DesktopWindowTreeHostX11::GetEventProcessor() {
- return dispatcher();
+ return delegate_->GetEventProcessor();
}
////////////////////////////////////////////////////////////////////////////////
@@ -1127,7 +1128,7 @@
void DesktopWindowTreeHostX11::OnCaptureReleased() {
x11_capture_.reset();
g_current_capture = NULL;
- OnHostLostWindowCapture();
+ delegate_->OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
@@ -1340,9 +1341,9 @@
case FocusOut:
if (xev->xfocus.mode != NotifyGrab) {
ReleaseCapture();
- OnHostLostWindowCapture();
+ delegate_->OnHostLostWindowCapture();
} else {
- dispatcher()->OnHostLostMouseGrab();
+ delegate_->OnHostLostMouseGrab();
}
break;
case FocusIn:
@@ -1413,7 +1414,8 @@
int button = xievent->detail;
if (button == kBackMouseButton || button == kForwardMouseButton) {
aura::client::UserActionClient* gesture_client =
- aura::client::GetUserActionClient(window());
+ aura::client::GetUserActionClient(
+ delegate_->AsDispatcher()->window());
if (gesture_client) {
bool reverse_direction =
ui::IsTouchpadEvent(xev) && ui::IsNaturalScrollEnabled();
« no previous file with comments | « trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698