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

Side by Side Diff: ash/wm/gestures/two_finger_drag_handler.cc

Issue 10910164: Removes the grid from ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ShelfBrowserTest Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/gestures/system_pinch_handler.cc ('k') | ash/wm/toplevel_window_event_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gestures/two_finger_drag_handler.h" 5 #include "ash/wm/gestures/two_finger_drag_handler.h"
6 6
7 #include "ash/shell.h"
8 #include "ash/wm/default_window_resizer.h" 7 #include "ash/wm/default_window_resizer.h"
9 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
10 #include "ash/wm/workspace/snap_sizer.h" 9 #include "ash/wm/workspace/snap_sizer.h"
11 #include "ui/aura/client/window_types.h" 10 #include "ui/aura/client/window_types.h"
12 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
13 #include "ui/base/events/event.h" 12 #include "ui/base/events/event.h"
14 #include "ui/base/events/event_constants.h" 13 #include "ui/base/events/event_constants.h"
15 #include "ui/base/hit_test.h" 14 #include "ui/base/hit_test.h"
16 #include "ui/compositor/layer.h" 15 #include "ui/compositor/layer.h"
17 #include "ui/compositor/scoped_layer_animation_settings.h" 16 #include "ui/compositor/scoped_layer_animation_settings.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 Reset(); 60 Reset();
62 61
63 if (event.details().swipe_up()) { 62 if (event.details().swipe_up()) {
64 wm::MaximizeWindow(target); 63 wm::MaximizeWindow(target);
65 } else if (event.details().swipe_down()) { 64 } else if (event.details().swipe_down()) {
66 wm::MinimizeWindow(target); 65 wm::MinimizeWindow(target);
67 } else { 66 } else {
68 internal::SnapSizer sizer(target, 67 internal::SnapSizer sizer(target,
69 gfx::Point(), 68 gfx::Point(),
70 event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE : 69 event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE :
71 internal::SnapSizer::RIGHT_EDGE, 70 internal::SnapSizer::RIGHT_EDGE);
72 Shell::GetInstance()->GetGridSize());
73 71
74 ui::ScopedLayerAnimationSettings scoped_setter( 72 ui::ScopedLayerAnimationSettings scoped_setter(
75 target->layer()->GetAnimator()); 73 target->layer()->GetAnimator());
76 scoped_setter.SetPreemptionStrategy( 74 scoped_setter.SetPreemptionStrategy(
77 ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS); 75 ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
78 target->SetBounds(sizer.target_bounds()); 76 target->SetBounds(sizer.target_bounds());
79 } 77 }
80 return true; 78 return true;
81 } 79 }
82 80
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bool visible) { 113 bool visible) {
116 Reset(); 114 Reset();
117 } 115 }
118 116
119 void TwoFingerDragHandler::OnWindowDestroying(aura::Window* window) { 117 void TwoFingerDragHandler::OnWindowDestroying(aura::Window* window) {
120 Reset(); 118 Reset();
121 } 119 }
122 120
123 } // namespace internal 121 } // namespace internal
124 } // namespace ash 122 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/gestures/system_pinch_handler.cc ('k') | ash/wm/toplevel_window_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698