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

Side by Side Diff: ui/native_theme/native_theme_base.cc

Issue 2921523002: Clean up unused grit header includes in ui/. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ui/native_theme/common_theme.cc ('k') | ui/views/button_drag_utils.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 #include <memory> 8 #include <memory>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "cc/paint/paint_flags.h" 12 #include "cc/paint/paint_flags.h"
13 #include "cc/paint/paint_shader.h" 13 #include "cc/paint/paint_shader.h"
14 #include "third_party/skia/include/core/SkPath.h" 14 #include "third_party/skia/include/core/SkPath.h"
15 #include "third_party/skia/include/effects/SkGradientShader.h" 15 #include "third_party/skia/include/effects/SkGradientShader.h"
16 #include "ui/base/layout.h" 16 #include "ui/base/layout.h"
17 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
18 #include "ui/base/ui_base_switches.h" 18 #include "ui/base/ui_base_switches.h"
19 #include "ui/gfx/canvas.h" 19 #include "ui/gfx/canvas.h"
20 #include "ui/gfx/color_palette.h" 20 #include "ui/gfx/color_palette.h"
21 #include "ui/gfx/color_utils.h" 21 #include "ui/gfx/color_utils.h"
22 #include "ui/gfx/geometry/rect.h" 22 #include "ui/gfx/geometry/rect.h"
23 #include "ui/gfx/geometry/rect_f.h" 23 #include "ui/gfx/geometry/rect_f.h"
24 #include "ui/gfx/geometry/size.h" 24 #include "ui/gfx/geometry/size.h"
25 #include "ui/gfx/image/image_skia.h" 25 #include "ui/gfx/image/image_skia.h"
26 #include "ui/gfx/skia_util.h" 26 #include "ui/gfx/skia_util.h"
27 #include "ui/native_theme/common_theme.h" 27 #include "ui/native_theme/common_theme.h"
28 #include "ui/resources/grit/ui_resources.h"
29 28
30 namespace { 29 namespace {
31 30
32 // These are the default dimensions of radio buttons and checkboxes. 31 // These are the default dimensions of radio buttons and checkboxes.
33 const int kCheckboxAndRadioWidth = 13; 32 const int kCheckboxAndRadioWidth = 13;
34 const int kCheckboxAndRadioHeight = 13; 33 const int kCheckboxAndRadioHeight = 13;
35 34
36 // These sizes match the sizes in Chromium Win. 35 // These sizes match the sizes in Chromium Win.
37 const int kSliderThumbWidth = 11; 36 const int kSliderThumbWidth = 11;
38 const int kSliderThumbHeight = 21; 37 const int kSliderThumbHeight = 21;
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 SkScalar min_diff = Clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f); 1015 SkScalar min_diff = Clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f);
1017 SkScalar diff = Clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f); 1016 SkScalar diff = Clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f);
1018 1017
1019 if (hsv1[2] + hsv2[2] > 1.0) 1018 if (hsv1[2] + hsv2[2] > 1.0)
1020 diff = -diff; 1019 diff = -diff;
1021 1020
1022 return SaturateAndBrighten(hsv2, -0.2f, diff); 1021 return SaturateAndBrighten(hsv2, -0.2f, diff);
1023 } 1022 }
1024 1023
1025 } // namespace ui 1024 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/common_theme.cc ('k') | ui/views/button_drag_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698