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

Side by Side Diff: ash/wm/window_animations.cc

Issue 1540753002: Switch to standard integer types in ash/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: arraysize Created 5 years 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/video_detector_unittest.cc ('k') | ash/wm/window_cycle_controller.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/window_animations.h" 5 #include "ash/wm/window_animations.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const float kWindowAnimation_HideBrightnessGrayscale = 1.f; 55 const float kWindowAnimation_HideBrightnessGrayscale = 1.f;
56 const float kWindowAnimation_ShowBrightnessGrayscale = 0.f; 56 const float kWindowAnimation_ShowBrightnessGrayscale = 0.f;
57 57
58 const float kWindowAnimation_HideOpacity = 0.f; 58 const float kWindowAnimation_HideOpacity = 0.f;
59 const float kWindowAnimation_ShowOpacity = 1.f; 59 const float kWindowAnimation_ShowOpacity = 1.f;
60 60
61 // Scales for AshWindow above/below current workspace. 61 // Scales for AshWindow above/below current workspace.
62 const float kLayerScaleAboveSize = 1.1f; 62 const float kLayerScaleAboveSize = 1.1f;
63 const float kLayerScaleBelowSize = .9f; 63 const float kLayerScaleBelowSize = .9f;
64 64
65 int64 Round64(float f) { 65 int64_t Round64(float f) {
66 return static_cast<int64>(f + 0.5f); 66 return static_cast<int64_t>(f + 0.5f);
67 } 67 }
68 68
69 base::TimeDelta GetCrossFadeDuration(aura::Window* window, 69 base::TimeDelta GetCrossFadeDuration(aura::Window* window,
70 const gfx::RectF& old_bounds, 70 const gfx::RectF& old_bounds,
71 const gfx::Rect& new_bounds) { 71 const gfx::Rect& new_bounds) {
72 if (::wm::WindowAnimationsDisabled(window)) 72 if (::wm::WindowAnimationsDisabled(window))
73 return base::TimeDelta(); 73 return base::TimeDelta();
74 74
75 int old_area = static_cast<int>(old_bounds.width() * old_bounds.height()); 75 int old_area = static_cast<int>(old_bounds.width() * old_bounds.height());
76 int new_area = new_bounds.width() * new_bounds.height(); 76 int new_area = new_bounds.width() * new_bounds.height();
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 case SHELF_ALIGNMENT_LEFT: 503 case SHELF_ALIGNMENT_LEFT:
504 return gfx::Rect(work_area.x(), work_area.y(), 0, 0); 504 return gfx::Rect(work_area.x(), work_area.y(), 0, 0);
505 case SHELF_ALIGNMENT_RIGHT: 505 case SHELF_ALIGNMENT_RIGHT:
506 return gfx::Rect(work_area.right(), work_area.y(), 0, 0); 506 return gfx::Rect(work_area.right(), work_area.y(), 0, 0);
507 } 507 }
508 NOTREACHED(); 508 NOTREACHED();
509 return gfx::Rect(); 509 return gfx::Rect();
510 } 510 }
511 511
512 } // namespace ash 512 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/video_detector_unittest.cc ('k') | ash/wm/window_cycle_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698