OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/layout_test/layout_test_content_browser_client.h
" | 5 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h
" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 ShellContentBrowserClient::RenderProcessWillLaunch(host); | 61 ShellContentBrowserClient::RenderProcessWillLaunch(host); |
62 | 62 |
63 StoragePartition* partition = | 63 StoragePartition* partition = |
64 BrowserContext::GetDefaultStoragePartition(browser_context()); | 64 BrowserContext::GetDefaultStoragePartition(browser_context()); |
65 host->AddFilter(new LayoutTestMessageFilter( | 65 host->AddFilter(new LayoutTestMessageFilter( |
66 host->GetID(), | 66 host->GetID(), |
67 partition->GetDatabaseTracker(), | 67 partition->GetDatabaseTracker(), |
68 partition->GetQuotaManager(), | 68 partition->GetQuotaManager(), |
69 partition->GetURLRequestContext())); | 69 partition->GetURLRequestContext())); |
70 | 70 |
71 host->GetInterfaceRegistry()->AddInterface(base::Bind( | 71 host->Send(new ShellViewMsg_SetWebKitSourceDir(GetWebKitRootDirFilePath())); |
72 &LayoutTestBluetoothFakeAdapterSetterImpl::Create)); | 72 } |
73 | 73 |
74 host->Send(new ShellViewMsg_SetWebKitSourceDir(GetWebKitRootDirFilePath())); | 74 void LayoutTestContentBrowserClient::ExposeInterfacesToRenderer( |
| 75 shell::InterfaceRegistry* registry, |
| 76 RenderProcessHost* render_process_host) { |
| 77 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = |
| 78 content::BrowserThread::GetTaskRunnerForThread( |
| 79 content::BrowserThread::UI); |
| 80 registry->AddInterface( |
| 81 base::Bind(&LayoutTestBluetoothFakeAdapterSetterImpl::Create), |
| 82 ui_task_runner); |
75 } | 83 } |
76 | 84 |
77 void LayoutTestContentBrowserClient::OverrideWebkitPrefs( | 85 void LayoutTestContentBrowserClient::OverrideWebkitPrefs( |
78 RenderViewHost* render_view_host, | 86 RenderViewHost* render_view_host, |
79 WebPreferences* prefs) { | 87 WebPreferences* prefs) { |
80 BlinkTestController::Get()->OverrideWebkitPrefs(prefs); | 88 BlinkTestController::Get()->OverrideWebkitPrefs(prefs); |
81 } | 89 } |
82 | 90 |
83 void LayoutTestContentBrowserClient::ResourceDispatcherHostCreated() { | 91 void LayoutTestContentBrowserClient::ResourceDispatcherHostCreated() { |
84 set_resource_dispatcher_host_delegate( | 92 set_resource_dispatcher_host_delegate( |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); | 127 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); |
120 return shell_browser_main_parts(); | 128 return shell_browser_main_parts(); |
121 } | 129 } |
122 | 130 |
123 PlatformNotificationService* | 131 PlatformNotificationService* |
124 LayoutTestContentBrowserClient::GetPlatformNotificationService() { | 132 LayoutTestContentBrowserClient::GetPlatformNotificationService() { |
125 return layout_test_notification_manager_.get(); | 133 return layout_test_notification_manager_.get(); |
126 } | 134 } |
127 | 135 |
128 } // namespace content | 136 } // namespace content |
OLD | NEW |