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

Unified Diff: extensions/common/image_util.cc

Issue 1781563003: chrome.browserAction.setBadgeBackgroundColor accepts color keyword (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: extensions/common/image_util.cc
diff --git a/extensions/common/image_util.cc b/extensions/common/image_util.cc
index efad19b68b168d30ac04fbf5f5bbe8143cc91714..6a8e13a67de42cc4e609dae22e00f72d4ede2e64 100644
--- a/extensions/common/image_util.cc
+++ b/extensions/common/image_util.cc
@@ -13,6 +13,7 @@
#include "base/strings/stringprintf.h"
#include "third_party/re2/src/re2/re2.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "third_party/skia/include/utils/SkParse.h"
#include "ui/gfx/color_utils.h"
namespace extensions {
@@ -29,6 +30,11 @@ bool ParseCssColorString(const std::string& color_string, SkColor* result) {
NOTIMPLEMENTED();
return false;
}
+ if (SkParse::FindNamedColor(color_string.c_str(), color_string.size(),
Devlin 2016/03/09 17:52:20 nifty!
+ result) != nullptr) {
+ return true;
+ }
+
return false;
}
« no previous file with comments | « chrome/test/data/extensions/api_test/browser_action/color/update4.js ('k') | extensions/common/image_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698