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

Side by Side Diff: ash/wm/workspace/two_step_edge_cycler.cc

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « ash/wm/workspace/two_step_edge_cycler.h ('k') | ash/wm/workspace/workspace_event_handler.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/common/wm/workspace/two_step_edge_cycler.h" 5 #include "ash/wm/workspace/two_step_edge_cycler.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 8
9 namespace ash { 9 namespace ash {
10 namespace { 10 namespace {
11 11
12 // We cycle to the second mode if any of the following happens while the mouse 12 // We cycle to the second mode if any of the following happens while the mouse
13 // is on the edge of the workspace: 13 // is on the edge of the workspace:
14 // . The user stops moving the mouse for |kMaxDelay| and then moves the mouse 14 // . The user stops moving the mouse for |kMaxDelay| and then moves the mouse
15 // again in the preferred direction from the last paused location for at least 15 // again in the preferred direction from the last paused location for at least
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 ++num_moves_; 55 ++num_moves_;
56 bool moved_in_the_same_direction_after_pause = 56 bool moved_in_the_same_direction_after_pause =
57 paused_ && std::abs(location.x() - paused_x_) >= kMaxPixelsAfterPause; 57 paused_ && std::abs(location.x() - paused_x_) >= kMaxPixelsAfterPause;
58 second_mode_ = moved_in_the_same_direction_after_pause || 58 second_mode_ = moved_in_the_same_direction_after_pause ||
59 std::abs(location.x() - start_x_) >= kMaxPixels || 59 std::abs(location.x() - start_x_) >= kMaxPixels ||
60 num_moves_ >= kMaxMoves; 60 num_moves_ >= kMaxMoves;
61 } 61 }
62 62
63 } // namespace ash 63 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/two_step_edge_cycler.h ('k') | ash/wm/workspace/workspace_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698