| 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 "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
| 8 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| 10 #include "content/public/browser/resource_dispatcher_host.h" | 11 #include "content/public/browser/resource_dispatcher_host.h" |
| 11 #include "content/public/browser/storage_partition.h" | 12 #include "content/public/browser/storage_partition.h" |
| 12 #include "content/public/common/service_registry.h" | 13 #include "content/public/common/service_registry.h" |
| 13 #include "content/shell/browser/layout_test/blink_test_controller.h" | 14 #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" | 15 #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" | 16 #include "content/shell/browser/layout_test/layout_test_browser_context.h" |
| 16 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h" | 17 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 75 } |
| 75 | 76 |
| 76 void LayoutTestContentBrowserClient::OverrideWebkitPrefs( | 77 void LayoutTestContentBrowserClient::OverrideWebkitPrefs( |
| 77 RenderViewHost* render_view_host, | 78 RenderViewHost* render_view_host, |
| 78 WebPreferences* prefs) { | 79 WebPreferences* prefs) { |
| 79 BlinkTestController::Get()->OverrideWebkitPrefs(prefs); | 80 BlinkTestController::Get()->OverrideWebkitPrefs(prefs); |
| 80 } | 81 } |
| 81 | 82 |
| 82 void LayoutTestContentBrowserClient::ResourceDispatcherHostCreated() { | 83 void LayoutTestContentBrowserClient::ResourceDispatcherHostCreated() { |
| 83 set_resource_dispatcher_host_delegate( | 84 set_resource_dispatcher_host_delegate( |
| 84 make_scoped_ptr(new LayoutTestResourceDispatcherHostDelegate)); | 85 base::WrapUnique(new LayoutTestResourceDispatcherHostDelegate)); |
| 85 ResourceDispatcherHost::Get()->SetDelegate( | 86 ResourceDispatcherHost::Get()->SetDelegate( |
| 86 resource_dispatcher_host_delegate()); | 87 resource_dispatcher_host_delegate()); |
| 87 } | 88 } |
| 88 | 89 |
| 89 void LayoutTestContentBrowserClient::AppendExtraCommandLineSwitches( | 90 void LayoutTestContentBrowserClient::AppendExtraCommandLineSwitches( |
| 90 base::CommandLine* command_line, | 91 base::CommandLine* command_line, |
| 91 int child_process_id) { | 92 int child_process_id) { |
| 92 command_line->AppendSwitch(switches::kRunLayoutTest); | 93 command_line->AppendSwitch(switches::kRunLayoutTest); |
| 93 ShellContentBrowserClient::AppendExtraCommandLineSwitches(command_line, | 94 ShellContentBrowserClient::AppendExtraCommandLineSwitches(command_line, |
| 94 child_process_id); | 95 child_process_id); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 118 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); | 119 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); |
| 119 return shell_browser_main_parts(); | 120 return shell_browser_main_parts(); |
| 120 } | 121 } |
| 121 | 122 |
| 122 PlatformNotificationService* | 123 PlatformNotificationService* |
| 123 LayoutTestContentBrowserClient::GetPlatformNotificationService() { | 124 LayoutTestContentBrowserClient::GetPlatformNotificationService() { |
| 124 return layout_test_notification_manager_.get(); | 125 return layout_test_notification_manager_.get(); |
| 125 } | 126 } |
| 126 | 127 |
| 127 } // namespace content | 128 } // namespace content |
| OLD | NEW |