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

Side by Side Diff: ash/mus/frame/caption_buttons/frame_caption_button.cc

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment Created 4 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mash/wm/frame/caption_buttons/frame_caption_button.h" 5 #include "ash/mus/frame/caption_buttons/frame_caption_button.h"
6 6
7 #include "ui/base/resource/resource_bundle.h" 7 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/gfx/animation/slide_animation.h" 8 #include "ui/gfx/animation/slide_animation.h"
9 #include "ui/gfx/animation/throb_animation.h" 9 #include "ui/gfx/animation/throb_animation.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
11 11
12 namespace mash { 12 namespace ash {
13 namespace wm { 13 namespace mus {
14 14
15 namespace { 15 namespace {
16 16
17 // The duration of the crossfade animation when swapping the button's images. 17 // The duration of the crossfade animation when swapping the button's images.
18 const int kSwapImagesAnimationDurationMs = 200; 18 const int kSwapImagesAnimationDurationMs = 200;
19 19
20 // The duration of the fade out animation of the old icon during a crossfade 20 // The duration of the fade out animation of the old icon during a crossfade
21 // animation as a ratio of |kSwapImagesAnimationDurationMs|. 21 // animation as a ratio of |kSwapImagesAnimationDurationMs|.
22 const float kFadeOutRatio = 0.5f; 22 const float kFadeOutRatio = 0.5f;
23 23
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 alpha *= inactive_alpha; 183 alpha *= inactive_alpha;
184 } 184 }
185 185
186 SkPaint paint; 186 SkPaint paint;
187 paint.setAlpha(alpha); 187 paint.setAlpha(alpha);
188 canvas->DrawImageInt(to_center, (width() - to_center.width()) / 2, 188 canvas->DrawImageInt(to_center, (width() - to_center.width()) / 2,
189 (height() - to_center.height()) / 2, paint); 189 (height() - to_center.height()) / 2, paint);
190 } 190 }
191 191
192 } // namespace wm 192 } // namespace mus
193 } // namespace mash 193 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698