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

Unified Diff: content/shell/shell_content_browser_client.cc

Issue 11147003: [content shell] Enable editing commands from javascript for tests and universal access from file ur… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/shell_content_browser_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_content_browser_client.cc
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index 261e876217825886bc859850d7b33d34be33cd5a..c455fa96a6288dd9eb44c49f62c5399582ef5df9 100644
--- a/content/shell/shell_content_browser_client.cc
+++ b/content/shell/shell_content_browser_client.cc
@@ -17,6 +17,7 @@
#include "content/shell/shell_web_contents_view_delegate_creator.h"
#include "content/shell/webkit_test_runner_host.h"
#include "googleurl/src/gurl.h"
+#include "webkit/glue/webpreferences.h"
#if defined(OS_ANDROID)
#include "base/android/path_utils.h"
@@ -53,6 +54,17 @@ void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->AppendSwitch(switches::kDumpRenderTree);
}
+void ShellContentBrowserClient::OverrideWebkitPrefs(
+ RenderViewHost* render_view_host,
+ const GURL& url,
+ webkit_glue::WebPreferences* prefs) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
+ return;
+ prefs->dom_paste_enabled = true;
+ prefs->javascript_can_access_clipboard = true;
+ prefs->allow_universal_access_from_file_urls = true;
+}
+
void ShellContentBrowserClient::ResourceDispatcherHostCreated() {
resource_dispatcher_host_delegate_.reset(
new ShellResourceDispatcherHostDelegate());
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698