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

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

Issue 188223002: 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 5f00e62c08857071c5e0dd38051e1b318531eb96..8c7c3df5e8168bf4a26c5b821773f87b957d2e99 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
@@ -178,7 +178,7 @@ gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const {
void DesktopWindowTreeHostX11::HandleNativeWidgetActivationChanged(
bool active) {
if (active) {
- delegate_->OnHostActivated();
+ OnHostActivated();
open_windows().remove(xwindow_);
open_windows().insert(open_windows().begin(), xwindow_);
}
@@ -232,7 +232,6 @@ void DesktopWindowTreeHostX11::OnRootWindowCreated(
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.
@@ -915,7 +914,7 @@ void DesktopWindowTreeHostX11::PrepareForShutdown() {
// DesktopWindowTreeHostX11, ui::EventSource implementation:
ui::EventProcessor* DesktopWindowTreeHostX11::GetEventProcessor() {
- return delegate_->GetEventProcessor();
+ return dispatcher();
}
////////////////////////////////////////////////////////////////////////////////
@@ -1123,7 +1122,7 @@ void DesktopWindowTreeHostX11::SetUseNativeFrame(bool use_native_frame) {
void DesktopWindowTreeHostX11::OnCaptureReleased() {
x11_capture_.reset();
g_current_capture = NULL;
- delegate_->OnHostLostWindowCapture();
+ OnHostLostWindowCapture();
native_widget_delegate_->OnMouseCaptureLost();
}
@@ -1323,9 +1322,9 @@ uint32_t DesktopWindowTreeHostX11::Dispatch(const base::NativeEvent& event) {
case FocusOut:
if (xev->xfocus.mode != NotifyGrab) {
ReleaseCapture();
- delegate_->OnHostLostWindowCapture();
+ OnHostLostWindowCapture();
} else {
- delegate_->OnHostLostMouseGrab();
+ dispatcher()->OnHostLostMouseGrab();
}
break;
case FocusIn:
« 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