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

Unified Diff: content/shell/renderer/shell_render_view_observer.cc

Issue 17895003: Add --expose-internals-for-testing flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move flag to be content-shell specific Created 7 years, 6 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 | « content/shell/renderer/shell_render_view_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/shell_render_view_observer.cc
diff --git a/content/shell/renderer/shell_render_view_observer.cc b/content/shell/renderer/shell_render_view_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..238d443d3fb558332bf271aed8bb72c2470fba3b
--- /dev/null
+++ b/content/shell/renderer/shell_render_view_observer.cc
@@ -0,0 +1,27 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/shell/renderer/shell_render_view_observer.h"
+
+#include "base/command_line.h"
+#include "content/public/renderer/render_view.h"
+#include "content/public/renderer/render_view_observer.h"
+#include "content/shell/common/shell_switches.h"
+#include "third_party/WebKit/public/web/WebTestingSupport.h"
+#include "third_party/WebKit/public/web/WebView.h"
+
+namespace content {
+
+ShellRenderViewObserver::ShellRenderViewObserver(RenderView* render_view)
+ : RenderViewObserver(render_view) {
+}
+
+void ShellRenderViewObserver::DidClearWindowObject(WebKit::WebFrame* frame) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kExposeInternalsForTesting)) {
+ WebKit::WebTestingSupport::injectInternalsObject(frame);
+ }
+}
+
+} // namespace content
« no previous file with comments | « content/shell/renderer/shell_render_view_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698