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

Side by Side Diff: ui/native_theme/native_theme_base.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
« no previous file with comments | « ui/native_theme/native_theme_aura.cc ('k') | ui/native_theme/native_theme_win.cc » ('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 "ui/native_theme/native_theme_base.h" 5 #include "ui/native_theme/native_theme_base.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "third_party/skia/include/effects/SkGradientShader.h" 12 #include "third_party/skia/include/effects/SkGradientShader.h"
13 #include "ui/base/layout.h" 13 #include "ui/base/layout.h"
14 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/base/ui_base_switches.h" 15 #include "ui/base/ui_base_switches.h"
16 #include "ui/gfx/canvas.h" 16 #include "ui/gfx/canvas.h"
17 #include "ui/gfx/color_utils.h" 17 #include "ui/gfx/color_utils.h"
18 #include "ui/gfx/geometry/rect.h"
18 #include "ui/gfx/image/image_skia.h" 19 #include "ui/gfx/image/image_skia.h"
19 #include "ui/gfx/rect.h"
20 #include "ui/gfx/size.h" 20 #include "ui/gfx/size.h"
21 #include "ui/gfx/skia_util.h" 21 #include "ui/gfx/skia_util.h"
22 #include "ui/native_theme/common_theme.h" 22 #include "ui/native_theme/common_theme.h"
23 #include "ui/resources/grit/ui_resources.h" 23 #include "ui/resources/grit/ui_resources.h"
24 24
25 namespace { 25 namespace {
26 26
27 // These are the default dimensions of radio buttons and checkboxes. 27 // These are the default dimensions of radio buttons and checkboxes.
28 const int kCheckboxAndRadioWidth = 13; 28 const int kCheckboxAndRadioWidth = 13;
29 const int kCheckboxAndRadioHeight = 13; 29 const int kCheckboxAndRadioHeight = 13;
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 SkScalar min_diff = Clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f); 1081 SkScalar min_diff = Clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f);
1082 SkScalar diff = Clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f); 1082 SkScalar diff = Clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f);
1083 1083
1084 if (hsv1[2] + hsv2[2] > 1.0) 1084 if (hsv1[2] + hsv2[2] > 1.0)
1085 diff = -diff; 1085 diff = -diff;
1086 1086
1087 return SaturateAndBrighten(hsv2, -0.2f, diff); 1087 return SaturateAndBrighten(hsv2, -0.2f, diff);
1088 } 1088 }
1089 1089
1090 } // namespace ui 1090 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_aura.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698