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

Side by Side Diff: content/common/child_process_host_impl.cc

Issue 245443005: Move IPC::MessageFilter and router to a separate file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gn build Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | content/common/font_cache_dispatcher_win.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/common/child_process_host_impl.h" 5 #include "content/common/child_process_host_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/process/process_metrics.h" 15 #include "base/process/process_metrics.h"
16 #include "base/rand_util.h" 16 #include "base/rand_util.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 18 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
19 #include "content/common/child_process_messages.h" 19 #include "content/common/child_process_messages.h"
20 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" 20 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
21 #include "content/public/common/child_process_host_delegate.h" 21 #include "content/public/common/child_process_host_delegate.h"
22 #include "content/public/common/content_paths.h" 22 #include "content/public/common/content_paths.h"
23 #include "content/public/common/content_switches.h" 23 #include "content/public/common/content_switches.h"
24 #include "ipc/ipc_channel.h" 24 #include "ipc/ipc_channel.h"
25 #include "ipc/ipc_logging.h" 25 #include "ipc/ipc_logging.h"
26 #include "ipc/message_filter.h"
26 27
27 #if defined(OS_LINUX) 28 #if defined(OS_LINUX)
28 #include "base/linux_util.h" 29 #include "base/linux_util.h"
29 #elif defined(OS_WIN) 30 #elif defined(OS_WIN)
30 #include "content/common/font_cache_dispatcher_win.h" 31 #include "content/common/font_cache_dispatcher_win.h"
31 #endif // OS_LINUX 32 #endif // OS_LINUX
32 33
33 namespace { 34 namespace {
34 35
35 #if defined(OS_MACOSX) 36 #if defined(OS_MACOSX)
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 144
144 ChildProcessHostImpl::~ChildProcessHostImpl() { 145 ChildProcessHostImpl::~ChildProcessHostImpl() {
145 for (size_t i = 0; i < filters_.size(); ++i) { 146 for (size_t i = 0; i < filters_.size(); ++i) {
146 filters_[i]->OnChannelClosing(); 147 filters_[i]->OnChannelClosing();
147 filters_[i]->OnFilterRemoved(); 148 filters_[i]->OnFilterRemoved();
148 } 149 }
149 150
150 base::CloseProcessHandle(peer_handle_); 151 base::CloseProcessHandle(peer_handle_);
151 } 152 }
152 153
153 void ChildProcessHostImpl::AddFilter(IPC::ChannelProxy::MessageFilter* filter) { 154 void ChildProcessHostImpl::AddFilter(IPC::MessageFilter* filter) {
154 filters_.push_back(filter); 155 filters_.push_back(filter);
155 156
156 if (channel_) 157 if (channel_)
157 filter->OnFilterAdded(channel_.get()); 158 filter->OnFilterAdded(channel_.get());
158 } 159 }
159 160
160 void ChildProcessHostImpl::ForceShutdown() { 161 void ChildProcessHostImpl::ForceShutdown() {
161 Send(new ChildProcessMsg_Shutdown()); 162 Send(new ChildProcessMsg_Shutdown());
162 } 163 }
163 164
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 uint32 internalformat, 310 uint32 internalformat,
310 gfx::GpuMemoryBufferHandle* handle) { 311 gfx::GpuMemoryBufferHandle* handle) {
311 handle->type = gfx::SHARED_MEMORY_BUFFER; 312 handle->type = gfx::SHARED_MEMORY_BUFFER;
312 AllocateSharedMemory( 313 AllocateSharedMemory(
313 width * height * GpuMemoryBufferImpl::BytesPerPixel(internalformat), 314 width * height * GpuMemoryBufferImpl::BytesPerPixel(internalformat),
314 peer_handle_, 315 peer_handle_,
315 &handle->handle); 316 &handle->handle);
316 } 317 }
317 318
318 } // namespace content 319 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | content/common/font_cache_dispatcher_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698