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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 2755813002: Begin to wean child processes off reliance on a persistent service_manager::Connection to the brows… (Closed)
Patch Set: . Created 3 years, 9 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/gpu/gpu_child_thread.cc ('k') | content/public/child/child_thread.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 20 matching lines...) Expand all
31 #include "content/child/child_process.h" 31 #include "content/child/child_process.h"
32 #include "content/common/child_process_messages.h" 32 #include "content/common/child_process_messages.h"
33 #include "content/ppapi_plugin/broker_process_dispatcher.h" 33 #include "content/ppapi_plugin/broker_process_dispatcher.h"
34 #include "content/ppapi_plugin/plugin_process_dispatcher.h" 34 #include "content/ppapi_plugin/plugin_process_dispatcher.h"
35 #include "content/ppapi_plugin/ppapi_blink_platform_impl.h" 35 #include "content/ppapi_plugin/ppapi_blink_platform_impl.h"
36 #include "content/public/common/content_client.h" 36 #include "content/public/common/content_client.h"
37 #include "content/public/common/content_switches.h" 37 #include "content/public/common/content_switches.h"
38 #include "content/public/common/pepper_plugin_info.h" 38 #include "content/public/common/pepper_plugin_info.h"
39 #include "content/public/common/sandbox_init.h" 39 #include "content/public/common/sandbox_init.h"
40 #include "content/public/common/service_manager_connection.h" 40 #include "content/public/common/service_manager_connection.h"
41 #include "content/public/common/service_names.mojom.h"
41 #include "ipc/ipc_channel_handle.h" 42 #include "ipc/ipc_channel_handle.h"
42 #include "ipc/ipc_platform_file.h" 43 #include "ipc/ipc_platform_file.h"
43 #include "ipc/ipc_sync_channel.h" 44 #include "ipc/ipc_sync_channel.h"
44 #include "ipc/ipc_sync_message_filter.h" 45 #include "ipc/ipc_sync_message_filter.h"
45 #include "ppapi/c/dev/ppp_network_state_dev.h" 46 #include "ppapi/c/dev/ppp_network_state_dev.h"
46 #include "ppapi/c/pp_errors.h" 47 #include "ppapi/c/pp_errors.h"
47 #include "ppapi/c/ppp.h" 48 #include "ppapi/c/ppp.h"
48 #include "ppapi/proxy/interface_list.h" 49 #include "ppapi/proxy/interface_list.h"
49 #include "ppapi/proxy/plugin_globals.h" 50 #include "ppapi/proxy/plugin_globals.h"
50 #include "ppapi/proxy/plugin_message_filter.h" 51 #include "ppapi/proxy/plugin_message_filter.h"
51 #include "ppapi/proxy/ppapi_messages.h" 52 #include "ppapi/proxy/ppapi_messages.h"
52 #include "ppapi/proxy/resource_reply_thread_registrar.h" 53 #include "ppapi/proxy/resource_reply_thread_registrar.h"
53 #include "services/service_manager/public/cpp/connector.h" 54 #include "services/service_manager/public/cpp/connector.h"
54 #include "services/service_manager/public/cpp/interface_provider.h"
55 #include "services/ui/public/interfaces/constants.mojom.h" 55 #include "services/ui/public/interfaces/constants.mojom.h"
56 #include "third_party/WebKit/public/web/WebKit.h" 56 #include "third_party/WebKit/public/web/WebKit.h"
57 #include "ui/base/ui_base_switches.h" 57 #include "ui/base/ui_base_switches.h"
58 58
59 #if defined(OS_WIN) 59 #if defined(OS_WIN)
60 #include "base/win/win_util.h" 60 #include "base/win/win_util.h"
61 #include "base/win/windows_version.h" 61 #include "base/win/windows_version.h"
62 #include "content/child/font_warmup_win.h" 62 #include "content/child/font_warmup_win.h"
63 #include "sandbox/win/src/sandbox.h" 63 #include "sandbox/win/src/sandbox.h"
64 #elif defined(OS_MACOSX) 64 #elif defined(OS_MACOSX)
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (!command_line.HasSwitch(switches::kSingleProcess)) { 147 if (!command_line.HasSwitch(switches::kSingleProcess)) {
148 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; 148 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr;
149 if (IsRunningInMash()) { 149 if (IsRunningInMash()) {
150 #if defined(USE_AURA) 150 #if defined(USE_AURA)
151 GetServiceManagerConnection()->GetConnector()->BindInterface( 151 GetServiceManagerConnection()->GetConnector()->BindInterface(
152 ui::mojom::kServiceName, &manager_ptr); 152 ui::mojom::kServiceName, &manager_ptr);
153 #else 153 #else
154 NOTREACHED(); 154 NOTREACHED();
155 #endif 155 #endif
156 } else { 156 } else {
157 ChildThread::Get()->GetRemoteInterfaces()->GetInterface( 157 ChildThread::Get()->GetConnector()->BindInterface(
158 mojo::MakeRequest(&manager_ptr)); 158 mojom::kBrowserServiceName, mojo::MakeRequest(&manager_ptr));
159 } 159 }
160 discardable_shared_memory_manager_ = base::MakeUnique< 160 discardable_shared_memory_manager_ = base::MakeUnique<
161 discardable_memory::ClientDiscardableSharedMemoryManager>( 161 discardable_memory::ClientDiscardableSharedMemoryManager>(
162 std::move(manager_ptr), GetIOTaskRunner()); 162 std::move(manager_ptr), GetIOTaskRunner());
163 base::DiscardableMemoryAllocator::SetInstance( 163 base::DiscardableMemoryAllocator::SetInstance(
164 discardable_shared_memory_manager_.get()); 164 discardable_shared_memory_manager_.get());
165 } 165 }
166 field_trial_syncer_.InitFieldTrialObserving(command_line, 166 field_trial_syncer_.InitFieldTrialObserving(command_line,
167 switches::kSingleProcess); 167 switches::kSingleProcess);
168 } 168 }
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 GetHistogramName(is_broker_, "LoadTime", path), 637 GetHistogramName(is_broker_, "LoadTime", path),
638 base::TimeDelta::FromMilliseconds(1), 638 base::TimeDelta::FromMilliseconds(1),
639 base::TimeDelta::FromSeconds(10), 639 base::TimeDelta::FromSeconds(10),
640 50, 640 50,
641 base::HistogramBase::kUmaTargetedHistogramFlag); 641 base::HistogramBase::kUmaTargetedHistogramFlag);
642 642
643 histogram->AddTime(load_time); 643 histogram->AddTime(load_time);
644 } 644 }
645 645
646 } // namespace content 646 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/public/child/child_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698