Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Side by Side Diff: ash/shared/immersive_fullscreen_controller.cc

Issue 2271393002: Wires up drags to pointer watcher adapter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed patch set 1 errors. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698