Add did-change-theme-color event to webview

This commit is contained in:
Brian R. Bondy 2015-12-22 17:16:00 -05:00
parent e14d472934
commit 11b2015535
6 changed files with 27 additions and 8 deletions

View file

@ -489,6 +489,16 @@ void WebContents::MediaPaused() {
Emit("media-paused");
}
void WebContents::DidChangeThemeColor(SkColor theme_color) {
char themeColor[8] = { 0 };
snprintf(themeColor, sizeof(themeColor),
"#%02X%02X%02X",
SkColorGetR(theme_color),
SkColorGetG(theme_color),
SkColorGetB(theme_color));
Emit("did-change-theme-color", themeColor);
}
void WebContents::DocumentLoadedInFrame(
content::RenderFrameHost* render_frame_host) {
if (!render_frame_host->GetParent())