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

Unified Diff: content/browser/renderer_host/render_view_host.cc

Issue 9353012: Add a switch to invert web contents (non-accel only). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing, now that skia change is in Created 8 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
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host.cc
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 24e09f55cf511df9b1d076acc4b5ed677e055b07..6d610b00b725ff084f5375525488ad7e36bee9d6 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -45,6 +45,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_constants.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/url_constants.h"
#include "net/base/net_util.h"
@@ -209,6 +210,10 @@ bool RenderViewHost::CreateRenderView(const string16& frame_name,
// Let our delegate know that we created a RenderView.
delegate_->RenderViewCreated(this);
+ // Invert the color scheme if a flag was set.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInvertWebContent))
+ Send(new ViewMsg_InvertWebContent(routing_id(), true));
+
FOR_EACH_OBSERVER(
content::RenderViewHostObserver, observers_, RenderViewHostInitialized());
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698