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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 if (observers_enabled_ == enable) | 306 if (observers_enabled_ == enable) |
307 return; | 307 return; |
308 observers_enabled_ = enable; | 308 observers_enabled_ = enable; |
309 | 309 |
310 if (enable) { | 310 if (enable) { |
311 immersive_focus_watcher_ = | 311 immersive_focus_watcher_ = |
312 ImmersiveHandlerFactory::Get()->CreateFocusWatcher(this); | 312 ImmersiveHandlerFactory::Get()->CreateFocusWatcher(this); |
313 immersive_gesture_handler_ = | 313 immersive_gesture_handler_ = |
314 ImmersiveHandlerFactory::Get()->CreateGestureHandler(this); | 314 ImmersiveHandlerFactory::Get()->CreateGestureHandler(this); |
315 widget_->AddObserver(this); | 315 widget_->AddObserver(this); |
316 const bool wants_moves = true; | 316 const views::RequestedEvents events = views::RequestedEvents::MOVES; |
317 ImmersiveContext::Get()->AddPointerWatcher(this, wants_moves); | 317 ImmersiveContext::Get()->AddPointerWatcher(this, events); |
318 } else { | 318 } else { |
319 ImmersiveContext::Get()->RemovePointerWatcher(this); | 319 ImmersiveContext::Get()->RemovePointerWatcher(this); |
320 widget_->RemoveObserver(this); | 320 widget_->RemoveObserver(this); |
321 immersive_gesture_handler_.reset(); | 321 immersive_gesture_handler_.reset(); |
322 immersive_focus_watcher_.reset(); | 322 immersive_focus_watcher_.reset(); |
323 | 323 |
324 animation_->Stop(); | 324 animation_->Stop(); |
325 } | 325 } |
326 } | 326 } |
327 | 327 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 location.y() < hit_bounds_in_screen.y() && | 644 location.y() < hit_bounds_in_screen.y() && |
645 location.x() >= hit_bounds_in_screen.x() && | 645 location.x() >= hit_bounds_in_screen.x() && |
646 location.x() < hit_bounds_in_screen.right()); | 646 location.x() < hit_bounds_in_screen.right()); |
647 } | 647 } |
648 | 648 |
649 gfx::Rect ImmersiveFullscreenController::GetDisplayBoundsInScreen() const { | 649 gfx::Rect ImmersiveFullscreenController::GetDisplayBoundsInScreen() const { |
650 return ImmersiveContext::Get()->GetDisplayBoundsInScreen(widget_); | 650 return ImmersiveContext::Get()->GetDisplayBoundsInScreen(widget_); |
651 } | 651 } |
652 | 652 |
653 } // namespace ash | 653 } // namespace ash |
OLD | NEW |