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

Unified Diff: chromecast/shell/renderer/cast_content_renderer_client.cc

Issue 454113003: Chromecast: pages default to having a black background. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restrict DEPS scope Created 6 years, 4 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
« no previous file with comments | « chromecast/shell/renderer/cast_content_renderer_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/shell/renderer/cast_content_renderer_client.cc
diff --git a/chromecast/shell/renderer/cast_content_renderer_client.cc b/chromecast/shell/renderer/cast_content_renderer_client.cc
index c3855a7fc90c59c7f04aa5bd2193563e723afdc6..e07e227929529efac738c392f12a4ee357645d48 100644
--- a/chromecast/shell/renderer/cast_content_renderer_client.cc
+++ b/chromecast/shell/renderer/cast_content_renderer_client.cc
@@ -9,11 +9,21 @@
#include "base/command_line.h"
#include "base/memory/memory_pressure_listener.h"
#include "content/public/common/content_switches.h"
+#include "content/public/renderer/render_view.h"
#include "crypto/nss_util.h"
+#include "third_party/WebKit/public/platform/WebColor.h"
+#include "third_party/WebKit/public/web/WebView.h"
namespace chromecast {
namespace shell {
+namespace {
+
+// Default background color to set for WebViews
+const blink::WebColor kColorBlack = 0x000000FF;
+
+} // namespace
+
void CastContentRendererClient::RenderThreadStarted() {
#if defined(USE_NSS)
// Note: Copied from chrome_render_process_observer.cc to fix b/8676652.
@@ -26,6 +36,14 @@ void CastContentRendererClient::RenderThreadStarted() {
#endif
}
+void CastContentRendererClient::RenderViewCreated(
+ content::RenderView* render_view) {
+ blink::WebView* webview = render_view->GetWebView();
+ if (webview) {
+ webview->setBaseBackgroundColor(kColorBlack);
+ }
+}
+
void CastContentRendererClient::AddKeySystems(
std::vector<content::KeySystemInfo>* key_systems) {
}
« no previous file with comments | « chromecast/shell/renderer/cast_content_renderer_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698