| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shared/immersive_fullscreen_controller.h" | 5 #include "ash/shared/immersive_fullscreen_controller.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "ash/shared/immersive_context.h" | 9 #include "ash/shared/immersive_context.h" |
| 10 #include "ash/shared/immersive_focus_watcher.h" | 10 #include "ash/shared/immersive_focus_watcher.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 if (event.IsMousePointerEvent()) { | 236 if (event.IsMousePointerEvent()) { |
| 237 const ui::MouseEvent mouse_event(event); | 237 const ui::MouseEvent mouse_event(event); |
| 238 OnMouseEvent(mouse_event, location_in_screen, target); | 238 OnMouseEvent(mouse_event, location_in_screen, target); |
| 239 } else { | 239 } else { |
| 240 DCHECK(event.IsTouchPointerEvent()); | 240 DCHECK(event.IsTouchPointerEvent()); |
| 241 const ui::TouchEvent touch_event(event); | 241 const ui::TouchEvent touch_event(event); |
| 242 OnTouchEvent(touch_event, location_in_screen); | 242 OnTouchEvent(touch_event, location_in_screen); |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 void ImmersiveFullscreenController::OnMouseCaptureChanged() { | |
| 247 const ui::MouseEvent event(ui::ET_MOUSE_CAPTURE_CHANGED, gfx::Point(), | |
| 248 gfx::Point(), ui::EventTimeForNow(), 0, 0); | |
| 249 OnMouseEvent(event, display::Screen::GetScreen()->GetCursorScreenPoint(), | |
| 250 nullptr); | |
| 251 } | |
| 252 | |
| 253 //////////////////////////////////////////////////////////////////////////////// | 246 //////////////////////////////////////////////////////////////////////////////// |
| 254 // views::WidgetObserver overrides: | 247 // views::WidgetObserver overrides: |
| 255 | 248 |
| 256 void ImmersiveFullscreenController::OnWidgetDestroying(views::Widget* widget) { | 249 void ImmersiveFullscreenController::OnWidgetDestroying(views::Widget* widget) { |
| 257 EnableWindowObservers(false); | 250 EnableWindowObservers(false); |
| 258 widget_window_ = nullptr; | 251 widget_window_ = nullptr; |
| 259 | 252 |
| 260 // Set |enabled_| to false such that any calls to MaybeStartReveal() and | 253 // Set |enabled_| to false such that any calls to MaybeStartReveal() and |
| 261 // MaybeEndReveal() have no effect. | 254 // MaybeEndReveal() have no effect. |
| 262 enabled_ = false; | 255 enabled_ = false; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 location.y() < hit_bounds_in_screen.y() && | 637 location.y() < hit_bounds_in_screen.y() && |
| 645 location.x() >= hit_bounds_in_screen.x() && | 638 location.x() >= hit_bounds_in_screen.x() && |
| 646 location.x() < hit_bounds_in_screen.right()); | 639 location.x() < hit_bounds_in_screen.right()); |
| 647 } | 640 } |
| 648 | 641 |
| 649 gfx::Rect ImmersiveFullscreenController::GetDisplayBoundsInScreen() const { | 642 gfx::Rect ImmersiveFullscreenController::GetDisplayBoundsInScreen() const { |
| 650 return ImmersiveContext::Get()->GetDisplayBoundsInScreen(widget_); | 643 return ImmersiveContext::Get()->GetDisplayBoundsInScreen(widget_); |
| 651 } | 644 } |
| 652 | 645 |
| 653 } // namespace ash | 646 } // namespace ash |
| OLD | NEW |