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

Side by Side Diff: ash/root_window_controller.cc

Issue 2786693002: Add PointerDetails to ui::MouseEvent's constructors (Closed)
Patch Set: mouse event constructor Created 3 years, 8 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 WmWindow::Get(window)); 464 WmWindow::Get(window));
465 465
466 return true; 466 return true;
467 } 467 }
468 468
469 WmWindow* RootWindowController::FindEventTarget( 469 WmWindow* RootWindowController::FindEventTarget(
470 const gfx::Point& location_in_screen) { 470 const gfx::Point& location_in_screen) {
471 gfx::Point location_in_root(location_in_screen); 471 gfx::Point location_in_root(location_in_screen);
472 aura::Window* root_window = GetRootWindow(); 472 aura::Window* root_window = GetRootWindow();
473 ::wm::ConvertPointFromScreen(root_window, &location_in_root); 473 ::wm::ConvertPointFromScreen(root_window, &location_in_root);
474 ui::MouseEvent test_event(ui::ET_MOUSE_MOVED, location_in_root, 474 ui::MouseEvent test_event(
475 location_in_root, ui::EventTimeForNow(), 475 ui::ET_MOUSE_MOVED, location_in_root, location_in_root,
476 ui::EF_NONE, ui::EF_NONE); 476 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
477 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
478 ui::PointerEvent::kMousePointerId));
477 ui::EventTarget* event_handler = 479 ui::EventTarget* event_handler =
478 root_window->GetHost() 480 root_window->GetHost()
479 ->dispatcher() 481 ->dispatcher()
480 ->GetDefaultEventTargeter() 482 ->GetDefaultEventTargeter()
481 ->FindTargetForEvent(root_window, &test_event); 483 ->FindTargetForEvent(root_window, &test_event);
482 return WmWindow::Get(static_cast<aura::Window*>(event_handler)); 484 return WmWindow::Get(static_cast<aura::Window*>(event_handler));
483 } 485 }
484 486
485 gfx::Point RootWindowController::GetLastMouseLocationInRoot() { 487 gfx::Point RootWindowController::GetLastMouseLocationInRoot() {
486 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot(); 488 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot();
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 EnableTouchHudProjection(); 1104 EnableTouchHudProjection();
1103 else 1105 else
1104 DisableTouchHudProjection(); 1106 DisableTouchHudProjection();
1105 } 1107 }
1106 1108
1107 RootWindowController* GetRootWindowController(const aura::Window* root_window) { 1109 RootWindowController* GetRootWindowController(const aura::Window* root_window) {
1108 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; 1110 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr;
1109 } 1111 }
1110 1112
1111 } // namespace ash 1113 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698