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

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

Issue 2545523007: Revert of discardable_memory: Using mojo IPC to replace Chrome IPC (Closed)
Patch Set: Created 4 years 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
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 30 matching lines...) Expand all
41 #include "ipc/ipc_sync_channel.h" 41 #include "ipc/ipc_sync_channel.h"
42 #include "ipc/ipc_sync_message_filter.h" 42 #include "ipc/ipc_sync_message_filter.h"
43 #include "ppapi/c/dev/ppp_network_state_dev.h" 43 #include "ppapi/c/dev/ppp_network_state_dev.h"
44 #include "ppapi/c/pp_errors.h" 44 #include "ppapi/c/pp_errors.h"
45 #include "ppapi/c/ppp.h" 45 #include "ppapi/c/ppp.h"
46 #include "ppapi/proxy/interface_list.h" 46 #include "ppapi/proxy/interface_list.h"
47 #include "ppapi/proxy/plugin_globals.h" 47 #include "ppapi/proxy/plugin_globals.h"
48 #include "ppapi/proxy/plugin_message_filter.h" 48 #include "ppapi/proxy/plugin_message_filter.h"
49 #include "ppapi/proxy/ppapi_messages.h" 49 #include "ppapi/proxy/ppapi_messages.h"
50 #include "ppapi/proxy/resource_reply_thread_registrar.h" 50 #include "ppapi/proxy/resource_reply_thread_registrar.h"
51 #include "services/service_manager/public/cpp/interface_provider.h"
52 #include "third_party/WebKit/public/web/WebKit.h" 51 #include "third_party/WebKit/public/web/WebKit.h"
53 #include "ui/base/ui_base_switches.h" 52 #include "ui/base/ui_base_switches.h"
54 53
55 #if defined(OS_WIN) 54 #if defined(OS_WIN)
56 #include "base/win/win_util.h" 55 #include "base/win/win_util.h"
57 #include "base/win/windows_version.h" 56 #include "base/win/windows_version.h"
58 #include "content/child/font_warmup_win.h" 57 #include "content/child/font_warmup_win.h"
59 #include "sandbox/win/src/sandbox.h" 58 #include "sandbox/win/src/sandbox.h"
60 #elif defined(OS_MACOSX) 59 #elif defined(OS_MACOSX)
61 #include "content/common/sandbox_init_mac.h" 60 #include "content/common/sandbox_init_mac.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter( 124 scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter(
126 new ppapi::proxy::PluginMessageFilter( 125 new ppapi::proxy::PluginMessageFilter(
127 NULL, plugin_globals_.resource_reply_thread_registrar())); 126 NULL, plugin_globals_.resource_reply_thread_registrar()));
128 channel()->AddFilter(plugin_filter.get()); 127 channel()->AddFilter(plugin_filter.get());
129 plugin_globals_.RegisterResourceMessageFilters(plugin_filter.get()); 128 plugin_globals_.RegisterResourceMessageFilters(plugin_filter.get());
130 } 129 }
131 130
132 // In single process, browser main loop set up the discardable memory 131 // In single process, browser main loop set up the discardable memory
133 // allocator. 132 // allocator.
134 if (!command_line.HasSwitch(switches::kSingleProcess)) { 133 if (!command_line.HasSwitch(switches::kSingleProcess)) {
135 discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr;
136 ChildThread::Get()->GetRemoteInterfaces()->GetInterface(
137 mojo::GetProxy(&manager_ptr));
138 discardable_shared_memory_manager_ = base::MakeUnique<
139 discardable_memory::ClientDiscardableSharedMemoryManager>(
140 std::move(manager_ptr), GetIOTaskRunner());
141 base::DiscardableMemoryAllocator::SetInstance( 134 base::DiscardableMemoryAllocator::SetInstance(
142 discardable_shared_memory_manager_.get()); 135 ChildThreadImpl::discardable_shared_memory_manager());
143 } 136 }
144 field_trial_syncer_.InitFieldTrialObserving(command_line, 137 field_trial_syncer_.InitFieldTrialObserving(command_line,
145 switches::kSingleProcess); 138 switches::kSingleProcess);
146 } 139 }
147 140
148 PpapiThread::~PpapiThread() { 141 PpapiThread::~PpapiThread() {
149 } 142 }
150 143
151 void PpapiThread::Shutdown() { 144 void PpapiThread::Shutdown() {
152 ChildThreadImpl::Shutdown(); 145 ChildThreadImpl::Shutdown();
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 GetHistogramName(is_broker_, "LoadTime", path), 580 GetHistogramName(is_broker_, "LoadTime", path),
588 base::TimeDelta::FromMilliseconds(1), 581 base::TimeDelta::FromMilliseconds(1),
589 base::TimeDelta::FromSeconds(10), 582 base::TimeDelta::FromSeconds(10),
590 50, 583 50,
591 base::HistogramBase::kUmaTargetedHistogramFlag); 584 base::HistogramBase::kUmaTargetedHistogramFlag);
592 585
593 histogram->AddTime(load_time); 586 histogram->AddTime(load_time);
594 } 587 }
595 588
596 } // namespace content 589 } // namespace content
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698