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

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

Issue 278303002: Fix the "call to 'abs' is ambiguous" error in line 42 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | 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/wm/workspace/two_step_edge_cycler.h" 5 #include "ash/wm/workspace/two_step_edge_cycler.h"
6 6
7 #include <cmath> 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. 15 // again.
16 // . The mouse moves |kMaxPixels| horizontal pixels. 16 // . The mouse moves |kMaxPixels| horizontal pixels.
17 // . The mouse is moved |kMaxMoves| times. 17 // . The mouse is moved |kMaxMoves| times.
(...skipping 20 matching lines...) Expand all
38 ++num_moves_; 38 ++num_moves_;
39 second_mode_ = 39 second_mode_ =
40 (base::TimeTicks::Now() - time_last_move_).InMilliseconds() > 40 (base::TimeTicks::Now() - time_last_move_).InMilliseconds() >
41 kMaxDelay || 41 kMaxDelay ||
42 std::abs(location.x() - start_x_) >= kMaxPixels || 42 std::abs(location.x() - start_x_) >= kMaxPixels ||
43 num_moves_ >= kMaxMoves; 43 num_moves_ >= kMaxMoves;
44 time_last_move_ = base::TimeTicks::Now(); 44 time_last_move_ = base::TimeTicks::Now();
45 } 45 }
46 46
47 } // namespace ash 47 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698