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

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: Created 4 years, 4 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool wants_moves = true;
317 ImmersiveContext::Get()->AddPointerWatcher(this, wants_moves); 317 const bool wants_drags = false;
318 ImmersiveContext::Get()->AddPointerWatcher(this, wants_moves, wants_drags);
318 } else { 319 } else {
319 ImmersiveContext::Get()->RemovePointerWatcher(this); 320 ImmersiveContext::Get()->RemovePointerWatcher(this);
320 widget_->RemoveObserver(this); 321 widget_->RemoveObserver(this);
321 immersive_gesture_handler_.reset(); 322 immersive_gesture_handler_.reset();
322 immersive_focus_watcher_.reset(); 323 immersive_focus_watcher_.reset();
323 324
324 animation_->Stop(); 325 animation_->Stop();
325 } 326 }
326 } 327 }
327 328
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 location.y() < hit_bounds_in_screen.y() && 645 location.y() < hit_bounds_in_screen.y() &&
645 location.x() >= hit_bounds_in_screen.x() && 646 location.x() >= hit_bounds_in_screen.x() &&
646 location.x() < hit_bounds_in_screen.right()); 647 location.x() < hit_bounds_in_screen.right());
647 } 648 }
648 649
649 gfx::Rect ImmersiveFullscreenController::GetDisplayBoundsInScreen() const { 650 gfx::Rect ImmersiveFullscreenController::GetDisplayBoundsInScreen() const {
650 return ImmersiveContext::Get()->GetDisplayBoundsInScreen(widget_); 651 return ImmersiveContext::Get()->GetDisplayBoundsInScreen(widget_);
651 } 652 }
652 653
653 } // namespace ash 654 } // namespace ash
OLDNEW
« ash/mus/bridge/wm_shell_mus.cc ('K') | « ash/shared/immersive_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698