OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |