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/wm/immersive_fullscreen_controller.h" | 5 #include "ash/wm/immersive_fullscreen_controller.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "ash/common/ash_constants.h" | 9 #include "ash/common/ash_constants.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 if (event.IsMousePointerEvent()) { | 278 if (event.IsMousePointerEvent()) { |
279 const ui::MouseEvent mouse_event(event); | 279 const ui::MouseEvent mouse_event(event); |
280 OnMouseEvent(mouse_event, location_in_screen, target); | 280 OnMouseEvent(mouse_event, location_in_screen, target); |
281 } else { | 281 } else { |
282 DCHECK(event.IsTouchPointerEvent()); | 282 DCHECK(event.IsTouchPointerEvent()); |
283 const ui::TouchEvent touch_event(event); | 283 const ui::TouchEvent touch_event(event); |
284 OnTouchEvent(touch_event, location_in_screen); | 284 OnTouchEvent(touch_event, location_in_screen); |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
288 void ImmersiveFullscreenController::OnMouseCaptureChanged() { | |
289 const ui::MouseEvent event(ui::ET_MOUSE_CAPTURE_CHANGED, gfx::Point(), | |
290 gfx::Point(), ui::EventTimeForNow(), 0, 0); | |
291 OnMouseEvent(event, display::Screen::GetScreen()->GetCursorScreenPoint(), | |
292 nullptr); | |
293 } | |
294 | |
295 //////////////////////////////////////////////////////////////////////////////// | 288 //////////////////////////////////////////////////////////////////////////////// |
296 // views::WidgetObserver overrides: | 289 // views::WidgetObserver overrides: |
297 | 290 |
298 void ImmersiveFullscreenController::OnWidgetDestroying(views::Widget* widget) { | 291 void ImmersiveFullscreenController::OnWidgetDestroying(views::Widget* widget) { |
299 EnableWindowObservers(false); | 292 EnableWindowObservers(false); |
300 widget_window_ = nullptr; | 293 widget_window_ = nullptr; |
301 | 294 |
302 // Set |enabled_| to false such that any calls to MaybeStartReveal() and | 295 // Set |enabled_| to false such that any calls to MaybeStartReveal() and |
303 // MaybeEndReveal() have no effect. | 296 // MaybeEndReveal() have no effect. |
304 enabled_ = false; | 297 enabled_ = false; |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 // another screen in an extended desktop). | 672 // another screen in an extended desktop). |
680 gfx::Rect screen_bounds = | 673 gfx::Rect screen_bounds = |
681 display::Screen::GetScreen()->GetDisplayNearestPoint(location).bounds(); | 674 display::Screen::GetScreen()->GetDisplayNearestPoint(location).bounds(); |
682 return (!screen_bounds.Contains(location) && | 675 return (!screen_bounds.Contains(location) && |
683 location.y() < hit_bounds_in_screen.y() && | 676 location.y() < hit_bounds_in_screen.y() && |
684 location.x() >= hit_bounds_in_screen.x() && | 677 location.x() >= hit_bounds_in_screen.x() && |
685 location.x() < hit_bounds_in_screen.right()); | 678 location.x() < hit_bounds_in_screen.right()); |
686 } | 679 } |
687 | 680 |
688 } // namespace ash | 681 } // namespace ash |
OLD | NEW |