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

Side by Side Diff: extensions/common/image_util.cc

Issue 1543053002: Switch to standard integer types in extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-extensions-browser
Patch Set: Created 4 years, 12 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 | « extensions/common/file_util_unittest.cc ('k') | extensions/common/manifest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/common/image_util.h" 5 #include "extensions/common/image_util.h"
6 6
7 #include <stddef.h>
7 #include <stdint.h> 8 #include <stdint.h>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
12 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
13 #include "third_party/re2/src/re2/re2.h" 14 #include "third_party/re2/src/re2/re2.h"
14 #include "third_party/skia/include/core/SkColor.h" 15 #include "third_party/skia/include/core/SkColor.h"
15 #include "ui/gfx/color_utils.h" 16 #include "ui/gfx/color_utils.h"
16 17
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 hsl.l = std::max(0.0, std::min(100.0, lightness)) / 100.0; 94 hsl.l = std::max(0.0, std::min(100.0, lightness)) / 100.0;
94 95
95 SkAlpha sk_alpha = std::max(0.0, std::min(1.0, alpha)) * 255; 96 SkAlpha sk_alpha = std::max(0.0, std::min(1.0, alpha)) * 255;
96 97
97 *result = color_utils::HSLToSkColor(hsl, sk_alpha); 98 *result = color_utils::HSLToSkColor(hsl, sk_alpha);
98 return true; 99 return true;
99 } 100 }
100 101
101 } // namespace image_util 102 } // namespace image_util
102 } // namespace extensions 103 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/file_util_unittest.cc ('k') | extensions/common/manifest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698