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

Side by Side Diff: ash/mus/window_manager.cc

Issue 2183163002: mus: Change PointerWatcher to observe all pointer events, with moves optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/mus/window_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/mus/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 shell_.reset(); 213 shell_.reset();
214 shadow_controller_.reset(); 214 shadow_controller_.reset();
215 215
216 FOR_EACH_OBSERVER(WindowManagerObserver, observers_, 216 FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
217 OnWindowTreeClientDestroyed()); 217 OnWindowTreeClientDestroyed());
218 218
219 window_tree_client_ = nullptr; 219 window_tree_client_ = nullptr;
220 window_manager_client_ = nullptr; 220 window_manager_client_ = nullptr;
221 } 221 }
222 222
223 void WindowManager::OnEventObserved(const ui::Event& event, 223 void WindowManager::OnPointerEventObserved(const ui::PointerEvent& event,
224 ui::Window* target) { 224 ui::Window* target) {
225 // Does not use EventObservers. 225 // Does not use PointerWatchers.
226 } 226 }
227 227
228 void WindowManager::SetWindowManagerClient(ui::WindowManagerClient* client) { 228 void WindowManager::SetWindowManagerClient(ui::WindowManagerClient* client) {
229 window_manager_client_ = client; 229 window_manager_client_ = client;
230 } 230 }
231 231
232 bool WindowManager::OnWmSetBounds(ui::Window* window, gfx::Rect* bounds) { 232 bool WindowManager::OnWmSetBounds(ui::Window* window, gfx::Rect* bounds) {
233 // TODO(sky): this indirectly sets bounds, which is against what 233 // TODO(sky): this indirectly sets bounds, which is against what
234 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this. 234 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this.
235 WmWindowMus::Get(window)->SetBounds(*bounds); 235 WmWindowMus::Get(window)->SetBounds(*bounds);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 const ui::Event& event) { 298 const ui::Event& event) {
299 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); 299 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id));
300 if (iter == accelerator_handlers_.end()) 300 if (iter == accelerator_handlers_.end())
301 return ui::mojom::EventResult::HANDLED; 301 return ui::mojom::EventResult::HANDLED;
302 302
303 return iter->second->OnAccelerator(id, event); 303 return iter->second->OnAccelerator(id, event);
304 } 304 }
305 305
306 } // namespace mus 306 } // namespace mus
307 } // namespace ash 307 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/mus/window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698