| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 if (observers_enabled_ == enable) | 299 if (observers_enabled_ == enable) |
| 300 return; | 300 return; |
| 301 observers_enabled_ = enable; | 301 observers_enabled_ = enable; |
| 302 | 302 |
| 303 if (enable) { | 303 if (enable) { |
| 304 immersive_focus_watcher_ = | 304 immersive_focus_watcher_ = |
| 305 ImmersiveHandlerFactory::Get()->CreateFocusWatcher(this); | 305 ImmersiveHandlerFactory::Get()->CreateFocusWatcher(this); |
| 306 immersive_gesture_handler_ = | 306 immersive_gesture_handler_ = |
| 307 ImmersiveHandlerFactory::Get()->CreateGestureHandler(this); | 307 ImmersiveHandlerFactory::Get()->CreateGestureHandler(this); |
| 308 widget_->AddObserver(this); | 308 widget_->AddObserver(this); |
| 309 const bool wants_moves = true; | 309 ImmersiveContext::Get()->AddPointerWatcher( |
| 310 ImmersiveContext::Get()->AddPointerWatcher(this, wants_moves); | 310 this, views::PointerWatcherEventTypes::MOVES); |
| 311 } else { | 311 } else { |
| 312 ImmersiveContext::Get()->RemovePointerWatcher(this); | 312 ImmersiveContext::Get()->RemovePointerWatcher(this); |
| 313 widget_->RemoveObserver(this); | 313 widget_->RemoveObserver(this); |
| 314 immersive_gesture_handler_.reset(); | 314 immersive_gesture_handler_.reset(); |
| 315 immersive_focus_watcher_.reset(); | 315 immersive_focus_watcher_.reset(); |
| 316 | 316 |
| 317 animation_->Stop(); | 317 animation_->Stop(); |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 | 320 |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 location.y() < hit_bounds_in_screen.y() && | 637 location.y() < hit_bounds_in_screen.y() && |
| 638 location.x() >= hit_bounds_in_screen.x() && | 638 location.x() >= hit_bounds_in_screen.x() && |
| 639 location.x() < hit_bounds_in_screen.right()); | 639 location.x() < hit_bounds_in_screen.right()); |
| 640 } | 640 } |
| 641 | 641 |
| 642 gfx::Rect ImmersiveFullscreenController::GetDisplayBoundsInScreen() const { | 642 gfx::Rect ImmersiveFullscreenController::GetDisplayBoundsInScreen() const { |
| 643 return ImmersiveContext::Get()->GetDisplayBoundsInScreen(widget_); | 643 return ImmersiveContext::Get()->GetDisplayBoundsInScreen(widget_); |
| 644 } | 644 } |
| 645 | 645 |
| 646 } // namespace ash | 646 } // namespace ash |
| OLD | NEW |