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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_icon_painter.cc

Issue 823133004: Cleanup: Update the path to gfx rect headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rect_f.h Created 5 years, 11 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/ui/toolbar/wrench_icon_painter.h" 5 #include "chrome/browser/ui/toolbar/wrench_icon_painter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "ui/base/theme_provider.h" 10 #include "ui/base/theme_provider.h"
11 #include "ui/gfx/animation/multi_animation.h" 11 #include "ui/gfx/animation/multi_animation.h"
12 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/image/image_skia.h" 14 #include "ui/gfx/image/image_skia.h"
14 #include "ui/gfx/rect.h"
15 15
16 namespace { 16 namespace {
17 17
18 // The wrench icon is made up of this many bars stacked vertically. 18 // The wrench icon is made up of this many bars stacked vertically.
19 const int kBarCount = 3; 19 const int kBarCount = 3;
20 20
21 // |value| is the animation progress from 0 to 1. |index| is the index of the 21 // |value| is the animation progress from 0 to 1. |index| is the index of the
22 // bar being drawn. This function returns a new progress value (from 0 to 1) 22 // bar being drawn. This function returns a new progress value (from 0 to 1)
23 // such that bars appear staggered. 23 // such that bars appear staggered.
24 double GetStaggeredValue(double value, int index) { 24 double GetStaggeredValue(double value, int index) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 case SEVERITY_LOW: 139 case SEVERITY_LOW:
140 return IDR_TOOLS_BAR_LOW; 140 return IDR_TOOLS_BAR_LOW;
141 case SEVERITY_MEDIUM: 141 case SEVERITY_MEDIUM:
142 return IDR_TOOLS_BAR_MEDIUM; 142 return IDR_TOOLS_BAR_MEDIUM;
143 case SEVERITY_HIGH: 143 case SEVERITY_HIGH:
144 return IDR_TOOLS_BAR_HIGH; 144 return IDR_TOOLS_BAR_HIGH;
145 } 145 }
146 NOTREACHED(); 146 NOTREACHED();
147 return 0; 147 return 0;
148 } 148 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/dock_info.h ('k') | chrome/browser/ui/toolbar/wrench_icon_painter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698