Add ToRGBHex color helper

This commit is contained in:
Kevin Sawicki 2016-10-10 14:27:16 -07:00
parent 13f9a6c273
commit 9b0a32f62c
3 changed files with 12 additions and 5 deletions

View file

@ -647,11 +647,7 @@ void WebContents::MediaStoppedPlaying(const MediaPlayerId& id) {
}
void WebContents::DidChangeThemeColor(SkColor theme_color) {
std::string hex_theme_color = base::StringPrintf("#%02X%02X%02X",
SkColorGetR(theme_color),
SkColorGetG(theme_color),
SkColorGetB(theme_color));
Emit("did-change-theme-color", hex_theme_color);
Emit("did-change-theme-color", atom::ToRGBHex(theme_color));
}
void WebContents::DocumentLoadedInFrame(