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

Side by Side Diff: ui/views/mus/window_manager_connection.cc

Issue 1934123004: mash: Fix shelf overflow bubble not closing on click outside its bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2openoverflow
Patch Set: rebase Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/mus/window_manager_connection.h" 5 #include "ui/views/mus/window_manager_connection.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 base::ObserverList<PointerWatcher>::Iterator iterator(&pointer_watchers_); 136 base::ObserverList<PointerWatcher>::Iterator iterator(&pointer_watchers_);
137 return !!iterator.GetNext(); 137 return !!iterator.GetNext();
138 } 138 }
139 139
140 void WindowManagerConnection::OnEmbed(mus::Window* root) {} 140 void WindowManagerConnection::OnEmbed(mus::Window* root) {}
141 141
142 void WindowManagerConnection::OnConnectionLost( 142 void WindowManagerConnection::OnConnectionLost(
143 mus::WindowTreeConnection* connection) {} 143 mus::WindowTreeConnection* connection) {}
144 144
145 void WindowManagerConnection::OnEventObserved(const ui::Event& event) { 145 void WindowManagerConnection::OnEventObserved(const ui::Event& event) {
146 if (!event.IsLocatedEvent())
147 return;
148 // The mojo input events type converter uses the event root_location field
149 // to store screen coordinates. Screen coordinates really should be returned
150 // separately. See http://crbug.com/608547
151 gfx::Point location_in_screen = event.AsLocatedEvent()->root_location();
146 if (event.type() == ui::ET_MOUSE_PRESSED) { 152 if (event.type() == ui::ET_MOUSE_PRESSED) {
147 FOR_EACH_OBSERVER(PointerWatcher, pointer_watchers_, 153 FOR_EACH_OBSERVER(
148 OnMousePressed(*event.AsMouseEvent())); 154 PointerWatcher, pointer_watchers_,
155 OnMousePressed(*event.AsMouseEvent(), location_in_screen));
149 } else if (event.type() == ui::ET_TOUCH_PRESSED) { 156 } else if (event.type() == ui::ET_TOUCH_PRESSED) {
150 FOR_EACH_OBSERVER(PointerWatcher, pointer_watchers_, 157 FOR_EACH_OBSERVER(
151 OnTouchPressed(*event.AsTouchEvent())); 158 PointerWatcher, pointer_watchers_,
159 OnTouchPressed(*event.AsTouchEvent(), location_in_screen));
152 } 160 }
153 } 161 }
154 162
155 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { 163 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() {
156 if (window_tree_connection_) 164 if (window_tree_connection_)
157 NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get()); 165 NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get());
158 } 166 }
159 167
160 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { 168 gfx::Point WindowManagerConnection::GetCursorScreenPoint() {
161 return window_tree_connection_->GetCursorScreenPoint(); 169 return window_tree_connection_->GetCursorScreenPoint();
162 } 170 }
163 171
164 } // namespace views 172 } // namespace views
OLDNEW
« no previous file with comments | « ash/system/tray/tray_event_filter.cc ('k') | ui/views/mus/window_manager_connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698