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

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

Issue 2346253004: Makes display roots be destroyed by client (Closed)
Patch Set: cleanup Created 4 years, 3 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') | services/ui/demo/mus_demo.h » ('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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 bool janky) { 290 bool janky) {
291 for (auto* window : client_windows) 291 for (auto* window : client_windows)
292 SetWindowIsJanky(window, janky); 292 SetWindowIsJanky(window, janky);
293 } 293 }
294 294
295 void WindowManager::OnWmNewDisplay(ui::Window* window, 295 void WindowManager::OnWmNewDisplay(ui::Window* window,
296 const display::Display& display) { 296 const display::Display& display) {
297 CreateRootWindowController(window, display); 297 CreateRootWindowController(window, display);
298 } 298 }
299 299
300 void WindowManager::OnWmDisplayRemoved(ui::Window* window) {
301 // TODO(sky): wire up this up correctly.
302 NOTIMPLEMENTED();
303 }
304
300 void WindowManager::OnWmPerformMoveLoop( 305 void WindowManager::OnWmPerformMoveLoop(
301 ui::Window* window, 306 ui::Window* window,
302 ui::mojom::MoveLoopSource source, 307 ui::mojom::MoveLoopSource source,
303 const gfx::Point& cursor_location, 308 const gfx::Point& cursor_location,
304 const base::Callback<void(bool)>& on_done) { 309 const base::Callback<void(bool)>& on_done) {
305 WmWindowMus* child_window = WmWindowMus::Get(window); 310 WmWindowMus* child_window = WmWindowMus::Get(window);
306 MoveEventHandler* handler = MoveEventHandler::GetForWindow(child_window); 311 MoveEventHandler* handler = MoveEventHandler::GetForWindow(child_window);
307 if (!handler) { 312 if (!handler) {
308 on_done.Run(false); 313 on_done.Run(false);
309 return; 314 return;
(...skipping 18 matching lines...) Expand all
328 const ui::Event& event) { 333 const ui::Event& event) {
329 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id)); 334 auto iter = accelerator_handlers_.find(GetAcceleratorNamespaceId(id));
330 if (iter == accelerator_handlers_.end()) 335 if (iter == accelerator_handlers_.end())
331 return ui::mojom::EventResult::HANDLED; 336 return ui::mojom::EventResult::HANDLED;
332 337
333 return iter->second->OnAccelerator(id, event); 338 return iter->second->OnAccelerator(id, event);
334 } 339 }
335 340
336 } // namespace mus 341 } // namespace mus
337 } // namespace ash 342 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/window_manager.h ('k') | services/ui/demo/mus_demo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698