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

Unified Diff: chrome/browser/ui/webui/color_utils.h

Issue 2714633003: Adds more metadata to the about:webapks page (Closed)
Patch Set: Adds more metadata to the about:webapks page Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/color_utils.h
diff --git a/chrome/browser/ui/webui/color_utils.h b/chrome/browser/ui/webui/color_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..24e9582d417b192aa2e980ba43dd8b3867f4925f
--- /dev/null
+++ b/chrome/browser/ui/webui/color_utils.h
@@ -0,0 +1,29 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_COLOR_UTILS_H_
+#define CHROME_BROWSER_UI_WEBUI_COLOR_UTILS_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "third_party/skia/include/core/SkColor.h"
+
pkotwicz 2017/02/27 20:50:59 Nit: ui/gfx/color_utils.h is probably a better hom
gonzalon 2017/02/27 21:33:17 Done.
+class ColorUtils {
+ public:
+ // Creates an rgba string for an SkColor.
+ static std::string SkColorToRGBAString(SkColor color);
+
+ // Creates an rgba string for a color represented as an int64.
+ static std::string ColorToString(int64_t color);
pkotwicz 2017/02/27 20:50:59 I think that this method should remain an implemen
gonzalon 2017/02/27 21:33:17 It was mostly a convenience function to avoid havi
+
+ // Creates an rgb string for an SkColor, but leaves the alpha blank so that
+ // the css can fill it in.
+ static std::string SkColorToRGBComponents(SkColor color);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ColorUtils);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_COLOR_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698