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

Side by Side Diff: ash/root_window_controller.cc

Issue 2891183002: chromeos: removes WmWindow usage from MultiWindowResizeController (Closed)
Patch Set: cleanup Created 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 return false; 445 return false;
446 446
447 // If the window is in the target modal container, only allow the top most 447 // If the window is in the target modal container, only allow the top most
448 // one. 448 // one.
449 if (modal_container && modal_container->Contains(window)) 449 if (modal_container && modal_container->Contains(window))
450 return modal_layout_manager->IsPartOfActiveModalWindow(window); 450 return modal_layout_manager->IsPartOfActiveModalWindow(window);
451 451
452 return true; 452 return true;
453 } 453 }
454 454
455 WmWindow* RootWindowController::FindEventTarget( 455 aura::Window* RootWindowController::FindEventTarget(
456 const gfx::Point& location_in_screen) { 456 const gfx::Point& location_in_screen) {
457 gfx::Point location_in_root(location_in_screen); 457 gfx::Point location_in_root(location_in_screen);
458 aura::Window* root_window = GetRootWindow(); 458 aura::Window* root_window = GetRootWindow();
459 ::wm::ConvertPointFromScreen(root_window, &location_in_root); 459 ::wm::ConvertPointFromScreen(root_window, &location_in_root);
460 ui::MouseEvent test_event(ui::ET_MOUSE_MOVED, location_in_root, 460 ui::MouseEvent test_event(ui::ET_MOUSE_MOVED, location_in_root,
461 location_in_root, ui::EventTimeForNow(), 461 location_in_root, ui::EventTimeForNow(),
462 ui::EF_NONE, ui::EF_NONE); 462 ui::EF_NONE, ui::EF_NONE);
463 ui::EventTarget* event_handler = 463 ui::EventTarget* event_handler =
464 root_window->GetHost() 464 root_window->GetHost()
465 ->dispatcher() 465 ->dispatcher()
466 ->GetDefaultEventTargeter() 466 ->GetDefaultEventTargeter()
467 ->FindTargetForEvent(root_window, &test_event); 467 ->FindTargetForEvent(root_window, &test_event);
468 return WmWindow::Get(static_cast<aura::Window*>(event_handler)); 468 return static_cast<aura::Window*>(event_handler);
469 } 469 }
470 470
471 gfx::Point RootWindowController::GetLastMouseLocationInRoot() { 471 gfx::Point RootWindowController::GetLastMouseLocationInRoot() {
472 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot(); 472 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot();
473 } 473 }
474 474
475 aura::Window* RootWindowController::GetContainer(int container_id) { 475 aura::Window* RootWindowController::GetContainer(int container_id) {
476 return GetRootWindow()->GetChildById(container_id); 476 return GetRootWindow()->GetChildById(container_id);
477 } 477 }
478 478
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 EnableTouchHudProjection(); 1084 EnableTouchHudProjection();
1085 else 1085 else
1086 DisableTouchHudProjection(); 1086 DisableTouchHudProjection();
1087 } 1087 }
1088 1088
1089 RootWindowController* GetRootWindowController(const aura::Window* root_window) { 1089 RootWindowController* GetRootWindowController(const aura::Window* root_window) {
1090 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; 1090 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr;
1091 } 1091 }
1092 1092
1093 } // namespace ash 1093 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698