Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: content/shell/browser/layout_test/layout_test_content_browser_client.cc

Issue 2096643002: Eliminate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mah3
Patch Set: . Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/browser/DEPS ('k') | content/test/render_thread_impl_browser_test_ipc_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/public/common/service_registry.h" 13 #include "content/public/common/service_registry.h"
14 #include "content/shell/browser/layout_test/blink_test_controller.h" 14 #include "content/shell/browser/layout_test/blink_test_controller.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_bluetooth_fake_adapter_s etter_impl.h"
16 #include "content/shell/browser/layout_test/layout_test_browser_context.h" 16 #include "content/shell/browser/layout_test/layout_test_browser_context.h"
17 #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"
18 #include "content/shell/browser/layout_test/layout_test_message_filter.h" 18 #include "content/shell/browser/layout_test/layout_test_message_filter.h"
19 #include "content/shell/browser/layout_test/layout_test_notification_manager.h" 19 #include "content/shell/browser/layout_test/layout_test_notification_manager.h"
20 #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"
21 #include "content/shell/browser/shell_browser_context.h" 21 #include "content/shell/browser/shell_browser_context.h"
22 #include "content/shell/common/layout_test/layout_test_switches.h" 22 #include "content/shell/common/layout_test/layout_test_switches.h"
23 #include "content/shell/common/shell_messages.h" 23 #include "content/shell/common/shell_messages.h"
24 #include "content/shell/renderer/layout_test/blink_test_helpers.h" 24 #include "content/shell/renderer/layout_test/blink_test_helpers.h"
25 #include "services/shell/public/cpp/interface_registry.h"
25 26
26 namespace content { 27 namespace content {
27 namespace { 28 namespace {
28 29
29 LayoutTestContentBrowserClient* g_layout_test_browser_client; 30 LayoutTestContentBrowserClient* g_layout_test_browser_client;
30 31
31 } // namespace 32 } // namespace
32 33
33 LayoutTestContentBrowserClient::LayoutTestContentBrowserClient() { 34 LayoutTestContentBrowserClient::LayoutTestContentBrowserClient() {
34 DCHECK(!g_layout_test_browser_client); 35 DCHECK(!g_layout_test_browser_client);
(...skipping 26 matching lines...) Expand all
61 ShellContentBrowserClient::RenderProcessWillLaunch(host); 62 ShellContentBrowserClient::RenderProcessWillLaunch(host);
62 63
63 StoragePartition* partition = 64 StoragePartition* partition =
64 BrowserContext::GetDefaultStoragePartition(browser_context()); 65 BrowserContext::GetDefaultStoragePartition(browser_context());
65 host->AddFilter(new LayoutTestMessageFilter( 66 host->AddFilter(new LayoutTestMessageFilter(
66 host->GetID(), 67 host->GetID(),
67 partition->GetDatabaseTracker(), 68 partition->GetDatabaseTracker(),
68 partition->GetQuotaManager(), 69 partition->GetQuotaManager(),
69 partition->GetURLRequestContext())); 70 partition->GetURLRequestContext()));
70 71
71 host->GetServiceRegistry()->AddService(base::Bind( 72 host->GetInterfaceRegistry()->AddInterface(base::Bind(
72 &LayoutTestBluetoothFakeAdapterSetterImpl::Create, host->GetID())); 73 &LayoutTestBluetoothFakeAdapterSetterImpl::Create, host->GetID()));
73 74
74 host->Send(new ShellViewMsg_SetWebKitSourceDir(GetWebKitRootDirFilePath())); 75 host->Send(new ShellViewMsg_SetWebKitSourceDir(GetWebKitRootDirFilePath()));
75 } 76 }
76 77
77 void LayoutTestContentBrowserClient::OverrideWebkitPrefs( 78 void LayoutTestContentBrowserClient::OverrideWebkitPrefs(
78 RenderViewHost* render_view_host, 79 RenderViewHost* render_view_host,
79 WebPreferences* prefs) { 80 WebPreferences* prefs) {
80 BlinkTestController::Get()->OverrideWebkitPrefs(prefs); 81 BlinkTestController::Get()->OverrideWebkitPrefs(prefs);
81 } 82 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); 120 set_browser_main_parts(new LayoutTestBrowserMainParts(parameters));
120 return shell_browser_main_parts(); 121 return shell_browser_main_parts();
121 } 122 }
122 123
123 PlatformNotificationService* 124 PlatformNotificationService*
124 LayoutTestContentBrowserClient::GetPlatformNotificationService() { 125 LayoutTestContentBrowserClient::GetPlatformNotificationService() {
125 return layout_test_notification_manager_.get(); 126 return layout_test_notification_manager_.get();
126 } 127 }
127 128
128 } // namespace content 129 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/DEPS ('k') | content/test/render_thread_impl_browser_test_ipc_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698