OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/shell_content_browser_client.h" | 5 #include "content/shell/browser/shell_content_browser_client.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 ShellContentBrowserClient::~ShellContentBrowserClient() { | 130 ShellContentBrowserClient::~ShellContentBrowserClient() { |
131 g_browser_client = NULL; | 131 g_browser_client = NULL; |
132 } | 132 } |
133 | 133 |
134 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( | 134 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
135 const MainFunctionParams& parameters) { | 135 const MainFunctionParams& parameters) { |
136 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); | 136 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); |
137 return shell_browser_main_parts_; | 137 return shell_browser_main_parts_; |
138 } | 138 } |
139 | 139 |
140 void ShellContentBrowserClient::RenderProcessHostCreated( | 140 void ShellContentBrowserClient::RenderProcessWillLaunch( |
141 RenderProcessHost* host) { | 141 RenderProcessHost* host) { |
142 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 142 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
143 return; | 143 return; |
144 host->AddFilter(new ShellMessageFilter( | 144 host->AddFilter(new ShellMessageFilter( |
145 host->GetID(), | 145 host->GetID(), |
146 BrowserContext::GetDefaultStoragePartition(browser_context()) | 146 BrowserContext::GetDefaultStoragePartition(browser_context()) |
147 ->GetDatabaseTracker(), | 147 ->GetDatabaseTracker(), |
148 BrowserContext::GetDefaultStoragePartition(browser_context()) | 148 BrowserContext::GetDefaultStoragePartition(browser_context()) |
149 ->GetQuotaManager(), | 149 ->GetQuotaManager(), |
150 BrowserContext::GetDefaultStoragePartition(browser_context()) | 150 BrowserContext::GetDefaultStoragePartition(browser_context()) |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 ShellBrowserContext* | 330 ShellBrowserContext* |
331 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 331 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
332 BrowserContext* content_browser_context) { | 332 BrowserContext* content_browser_context) { |
333 if (content_browser_context == browser_context()) | 333 if (content_browser_context == browser_context()) |
334 return browser_context(); | 334 return browser_context(); |
335 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 335 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
336 return off_the_record_browser_context(); | 336 return off_the_record_browser_context(); |
337 } | 337 } |
338 | 338 |
339 } // namespace content | 339 } // namespace content |
OLD | NEW |