| OLD | NEW |
| 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/display/window_tree_host_manager.h" | 5 #include "ash/display/window_tree_host_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/material_design/material_design_controller.h" | 10 #include "ash/common/material_design/material_design_controller.h" |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 aura::Window* target = static_cast<aura::Window*>(event->target()); | 334 aura::Window* target = static_cast<aura::Window*>(event->target()); |
| 335 mouse_location_ = event->root_location(); | 335 mouse_location_ = event->root_location(); |
| 336 target_root_ = target->GetRootWindow(); | 336 target_root_ = target->GetRootWindow(); |
| 337 event->StopPropagation(); | 337 event->StopPropagation(); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void OnTouchEvent(ui::TouchEvent* event) override { | 340 void OnTouchEvent(ui::TouchEvent* event) override { |
| 341 aura::Window* target = static_cast<aura::Window*>(event->target()); | 341 aura::Window* target = static_cast<aura::Window*>(event->target()); |
| 342 // Only record when the target is the wallpaper, which covers the entire | 342 // Only record when the target is the wallpaper, which covers the entire |
| 343 // root window. | 343 // root window. |
| 344 if (target->name() != kWallpaperView) | 344 if (target->GetName() != kWallpaperView) |
| 345 return; | 345 return; |
| 346 touch_radius_x_ = event->pointer_details().radius_x; | 346 touch_radius_x_ = event->pointer_details().radius_x; |
| 347 touch_radius_y_ = event->pointer_details().radius_y; | 347 touch_radius_y_ = event->pointer_details().radius_y; |
| 348 event->StopPropagation(); | 348 event->StopPropagation(); |
| 349 } | 349 } |
| 350 | 350 |
| 351 void OnScrollEvent(ui::ScrollEvent* event) override { | 351 void OnScrollEvent(ui::ScrollEvent* event) override { |
| 352 aura::Window* target = static_cast<aura::Window*>(event->target()); | 352 aura::Window* target = static_cast<aura::Window*>(event->target()); |
| 353 // Only record when the target is the wallpaper, which covers the entire | 353 // Only record when the target is the wallpaper, which covers the entire |
| 354 // root window. | 354 // root window. |
| 355 if (target->name() != kWallpaperView) | 355 if (target->GetName() != kWallpaperView) |
| 356 return; | 356 return; |
| 357 | 357 |
| 358 if (event->type() == ui::ET_SCROLL) { | 358 if (event->type() == ui::ET_SCROLL) { |
| 359 scroll_x_offset_ = event->x_offset(); | 359 scroll_x_offset_ = event->x_offset(); |
| 360 scroll_y_offset_ = event->y_offset(); | 360 scroll_y_offset_ = event->y_offset(); |
| 361 scroll_x_offset_ordinal_ = event->x_offset_ordinal(); | 361 scroll_x_offset_ordinal_ = event->x_offset_ordinal(); |
| 362 scroll_y_offset_ordinal_ = event->y_offset_ordinal(); | 362 scroll_y_offset_ordinal_ = event->y_offset_ordinal(); |
| 363 } | 363 } |
| 364 event->StopPropagation(); | 364 event->StopPropagation(); |
| 365 } | 365 } |
| (...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 widget->GetNativeWindow()->GetRootWindow()); | 1570 widget->GetNativeWindow()->GetRootWindow()); |
| 1571 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); | 1571 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); |
| 1572 | 1572 |
| 1573 UpdateDisplay("300x300"); | 1573 UpdateDisplay("300x300"); |
| 1574 watcher.Stop(); | 1574 watcher.Stop(); |
| 1575 | 1575 |
| 1576 widget->CloseNow(); | 1576 widget->CloseNow(); |
| 1577 } | 1577 } |
| 1578 | 1578 |
| 1579 } // namespace ash | 1579 } // namespace ash |
| OLD | NEW |