| 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/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/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( | 72 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
| 73 const MainFunctionParams& parameters) { | 73 const MainFunctionParams& parameters) { |
| 74 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); | 74 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); |
| 75 return shell_browser_main_parts_; | 75 return shell_browser_main_parts_; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void ShellContentBrowserClient::RenderProcessHostCreated( | 78 void ShellContentBrowserClient::RenderProcessHostCreated( |
| 79 RenderProcessHost* host) { | 79 RenderProcessHost* host) { |
| 80 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 80 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
| 81 return; | 81 return; |
| 82 host->GetChannel()->AddFilter(new ShellMessageFilter( | 82 host->AddFilter(new ShellMessageFilter( |
| 83 host->GetID(), | 83 host->GetID(), |
| 84 BrowserContext::GetDefaultStoragePartition(browser_context()) | 84 BrowserContext::GetDefaultStoragePartition(browser_context()) |
| 85 ->GetDatabaseTracker(), | 85 ->GetDatabaseTracker(), |
| 86 BrowserContext::GetDefaultStoragePartition(browser_context()) | 86 BrowserContext::GetDefaultStoragePartition(browser_context()) |
| 87 ->GetQuotaManager(), | 87 ->GetQuotaManager(), |
| 88 BrowserContext::GetDefaultStoragePartition(browser_context()) | 88 BrowserContext::GetDefaultStoragePartition(browser_context()) |
| 89 ->GetURLRequestContext())); | 89 ->GetURLRequestContext())); |
| 90 host->Send(new ShellViewMsg_SetWebKitSourceDir(webkit_source_dir_)); | 90 host->Send(new ShellViewMsg_SetWebKitSourceDir(webkit_source_dir_)); |
| 91 registrar_.Add(this, | 91 registrar_.Add(this, |
| 92 NOTIFICATION_RENDERER_PROCESS_CREATED, | 92 NOTIFICATION_RENDERER_PROCESS_CREATED, |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 ShellBrowserContext* | 273 ShellBrowserContext* |
| 274 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 274 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
| 275 BrowserContext* content_browser_context) { | 275 BrowserContext* content_browser_context) { |
| 276 if (content_browser_context == browser_context()) | 276 if (content_browser_context == browser_context()) |
| 277 return browser_context(); | 277 return browser_context(); |
| 278 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 278 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
| 279 return off_the_record_browser_context(); | 279 return off_the_record_browser_context(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 } // namespace content | 282 } // namespace content |
| OLD | NEW |