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

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

Issue 188853003: Revert of Clean up WindowEventDispatcher some more. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | « 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: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 4eb30c4a390160483671d9f40f8d0bb4a7155cbd..71fe892b53548bfe7b3abe072e8d5e6bdb2c4950 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -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_;
// If we're given a parent, we need to mark ourselves as transient to another
// window. Otherwise activation gets screwy.
@@ -926,7 +927,7 @@
// DesktopWindowTreeHostX11, ui::EventSource implementation:
ui::EventProcessor* DesktopWindowTreeHostX11::GetEventProcessor() {
- return dispatcher();
+ return delegate_->GetEventProcessor();
}
////////////////////////////////////////////////////////////////////////////////
@@ -1134,7 +1135,7 @@
void DesktopWindowTreeHostX11::OnCaptureReleased() {
x11_capture_.reset();
g_current_capture = NULL;
- OnHostLostWindowCapture();
+ delegate_->OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
@@ -1347,9 +1348,9 @@
case FocusOut:
if (xev->xfocus.mode != NotifyGrab) {
ReleaseCapture();
- OnHostLostWindowCapture();
+ delegate_->OnHostLostWindowCapture();
} else {
- dispatcher()->OnHostLostMouseGrab();
+ delegate_->OnHostLostMouseGrab();
}
break;
case FocusIn:
@@ -1420,7 +1421,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 | « 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