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

Side by Side Diff: content/shell/shell_content_browser_client.cc

Issue 11565036: [content shell] use WebTestRunner::WebPreferences for layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/shell/shell_messages.h » ('j') | content/shell/shell_webpreferences.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/shell_content_browser_client.h" 5 #include "content/shell/shell_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 84 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
85 command_line->AppendSwitch(switches::kDumpRenderTree); 85 command_line->AppendSwitch(switches::kDumpRenderTree);
86 } 86 }
87 87
88 void ShellContentBrowserClient::OverrideWebkitPrefs( 88 void ShellContentBrowserClient::OverrideWebkitPrefs(
89 RenderViewHost* render_view_host, 89 RenderViewHost* render_view_host,
90 const GURL& url, 90 const GURL& url,
91 webkit_glue::WebPreferences* prefs) { 91 webkit_glue::WebPreferences* prefs) {
92 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 92 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
93 return; 93 return;
94 WebKitTestController::Get()->web_preferences().Apply(prefs); 94 WebKitTestController::Get()->web_preferences().Export(prefs);
95 } 95 }
96 96
97 void ShellContentBrowserClient::ResourceDispatcherHostCreated() { 97 void ShellContentBrowserClient::ResourceDispatcherHostCreated() {
98 resource_dispatcher_host_delegate_.reset( 98 resource_dispatcher_host_delegate_.reset(
99 new ShellResourceDispatcherHostDelegate()); 99 new ShellResourceDispatcherHostDelegate());
100 ResourceDispatcherHost::Get()->SetDelegate( 100 ResourceDispatcherHost::Get()->SetDelegate(
101 resource_dispatcher_host_delegate_.get()); 101 resource_dispatcher_host_delegate_.get());
102 } 102 }
103 103
104 std::string ShellContentBrowserClient::GetDefaultDownloadName() { 104 std::string ShellContentBrowserClient::GetDefaultDownloadName() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 ShellBrowserContext* 158 ShellBrowserContext*
159 ShellContentBrowserClient::off_the_record_browser_context() { 159 ShellContentBrowserClient::off_the_record_browser_context() {
160 return shell_browser_main_parts_->off_the_record_browser_context(); 160 return shell_browser_main_parts_->off_the_record_browser_context();
161 } 161 }
162 162
163 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() { 163 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() {
164 return new ShellAccessTokenStore(browser_context()->GetRequestContext()); 164 return new ShellAccessTokenStore(browser_context()->GetRequestContext());
165 } 165 }
166 166
167 } // namespace content 167 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/shell/shell_messages.h » ('j') | content/shell/shell_webpreferences.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698