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" |
11 #include "content/public/browser/resource_dispatcher_host.h" | 11 #include "content/public/browser/resource_dispatcher_host.h" |
12 #include "content/public/browser/storage_partition.h" | 12 #include "content/public/browser/storage_partition.h" |
13 #include "content/shell/browser/layout_test/blink_test_controller.h" | 13 #include "content/shell/browser/layout_test/blink_test_controller.h" |
14 #include "content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_s
etter_impl.h" | 14 #include "content/shell/browser/layout_test/layout_test_bluetooth_fake_adapter_s
etter_impl.h" |
15 #include "content/shell/browser/layout_test/layout_test_browser_context.h" | 15 #include "content/shell/browser/layout_test/layout_test_browser_context.h" |
16 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h" | 16 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h" |
17 #include "content/shell/browser/layout_test/layout_test_message_filter.h" | 17 #include "content/shell/browser/layout_test/layout_test_message_filter.h" |
18 #include "content/shell/browser/layout_test/layout_test_notification_manager.h" | 18 #include "content/shell/browser/layout_test/layout_test_notification_manager.h" |
| 19 #include "content/shell/browser/layout_test/layout_test_payment_app_provider_imp
l.h" |
19 #include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host
_delegate.h" | 20 #include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host
_delegate.h" |
20 #include "content/shell/browser/shell_browser_context.h" | 21 #include "content/shell/browser/shell_browser_context.h" |
21 #include "content/shell/common/layout_test/layout_test_switches.h" | 22 #include "content/shell/common/layout_test/layout_test_switches.h" |
22 #include "content/shell/common/shell_messages.h" | 23 #include "content/shell/common/shell_messages.h" |
23 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 24 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
24 #include "services/service_manager/public/cpp/interface_registry.h" | 25 #include "services/service_manager/public/cpp/interface_registry.h" |
25 | 26 |
26 namespace content { | 27 namespace content { |
27 namespace { | 28 namespace { |
28 | 29 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 74 |
74 void LayoutTestContentBrowserClient::ExposeInterfacesToRenderer( | 75 void LayoutTestContentBrowserClient::ExposeInterfacesToRenderer( |
75 service_manager::InterfaceRegistry* registry, | 76 service_manager::InterfaceRegistry* registry, |
76 RenderProcessHost* render_process_host) { | 77 RenderProcessHost* render_process_host) { |
77 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = | 78 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = |
78 content::BrowserThread::GetTaskRunnerForThread( | 79 content::BrowserThread::GetTaskRunnerForThread( |
79 content::BrowserThread::UI); | 80 content::BrowserThread::UI); |
80 registry->AddInterface( | 81 registry->AddInterface( |
81 base::Bind(&LayoutTestBluetoothFakeAdapterSetterImpl::Create), | 82 base::Bind(&LayoutTestBluetoothFakeAdapterSetterImpl::Create), |
82 ui_task_runner); | 83 ui_task_runner); |
| 84 registry->AddInterface(base::Bind(&LayoutTestPaymentAppProviderImpl::Create), |
| 85 ui_task_runner); |
83 } | 86 } |
84 | 87 |
85 void LayoutTestContentBrowserClient::OverrideWebkitPrefs( | 88 void LayoutTestContentBrowserClient::OverrideWebkitPrefs( |
86 RenderViewHost* render_view_host, | 89 RenderViewHost* render_view_host, |
87 WebPreferences* prefs) { | 90 WebPreferences* prefs) { |
88 BlinkTestController::Get()->OverrideWebkitPrefs(prefs); | 91 BlinkTestController::Get()->OverrideWebkitPrefs(prefs); |
89 } | 92 } |
90 | 93 |
91 void LayoutTestContentBrowserClient::ResourceDispatcherHostCreated() { | 94 void LayoutTestContentBrowserClient::ResourceDispatcherHostCreated() { |
92 set_resource_dispatcher_host_delegate( | 95 set_resource_dispatcher_host_delegate( |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); | 130 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); |
128 return shell_browser_main_parts(); | 131 return shell_browser_main_parts(); |
129 } | 132 } |
130 | 133 |
131 PlatformNotificationService* | 134 PlatformNotificationService* |
132 LayoutTestContentBrowserClient::GetPlatformNotificationService() { | 135 LayoutTestContentBrowserClient::GetPlatformNotificationService() { |
133 return layout_test_notification_manager_.get(); | 136 return layout_test_notification_manager_.get(); |
134 } | 137 } |
135 | 138 |
136 } // namespace content | 139 } // namespace content |
OLD | NEW |