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

Side by Side Diff: ash/wm/gestures/system_pinch_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/default_window_resizer.cc ('k') | ash/wm/gestures/two_finger_drag_handler.cc » ('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/system_pinch_handler.h" 5 #include "ash/wm/gestures/system_pinch_handler.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // works correctly. 88 // works correctly.
89 if (wm::IsWindowMaximized(target_) || 89 if (wm::IsWindowMaximized(target_) ||
90 wm::IsWindowFullscreen(target_)) 90 wm::IsWindowFullscreen(target_))
91 wm::RestoreWindow(target_); 91 wm::RestoreWindow(target_);
92 92
93 ui::ScopedLayerAnimationSettings settings( 93 ui::ScopedLayerAnimationSettings settings(
94 target_->layer()->GetAnimator()); 94 target_->layer()->GetAnimator());
95 SnapSizer sizer(target_, 95 SnapSizer sizer(target_,
96 gfx::Point(), 96 gfx::Point(),
97 event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE : 97 event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE :
98 internal::SnapSizer::RIGHT_EDGE, 98 internal::SnapSizer::RIGHT_EDGE);
99 Shell::GetInstance()->GetGridSize());
100 target_->SetBounds(sizer.GetSnapBounds(target_->bounds())); 99 target_->SetBounds(sizer.GetSnapBounds(target_->bounds()));
101 } else if (event.details().swipe_up()) { 100 } else if (event.details().swipe_up()) {
102 if (!wm::IsWindowMaximized(target_) && 101 if (!wm::IsWindowMaximized(target_) &&
103 !wm::IsWindowFullscreen(target_)) 102 !wm::IsWindowFullscreen(target_))
104 wm::MaximizeWindow(target_); 103 wm::MaximizeWindow(target_);
105 } else if (event.details().swipe_down()) { 104 } else if (event.details().swipe_down()) {
106 wm::MinimizeWindow(target_); 105 wm::MinimizeWindow(target_);
107 } else { 106 } else {
108 NOTREACHED() << "Swipe happened without a direction."; 107 NOTREACHED() << "Swipe happened without a direction.";
109 } 108 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 phantom_state_ = PHANTOM_WINDOW_MINIMIZED; 145 phantom_state_ = PHANTOM_WINDOW_MINIMIZED;
147 return rect; 146 return rect;
148 } 147 }
149 148
150 phantom_state_ = PHANTOM_WINDOW_NORMAL; 149 phantom_state_ = PHANTOM_WINDOW_NORMAL;
151 return window->bounds(); 150 return window->bounds();
152 } 151 }
153 152
154 } // namespace internal 153 } // namespace internal
155 } // namespace ash 154 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/default_window_resizer.cc ('k') | ash/wm/gestures/two_finger_drag_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698