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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 6625064: Move the common child process messages into their own file. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/common/child_process_host.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "content/browser/renderer_host/pepper_message_filter.h" 84 #include "content/browser/renderer_host/pepper_message_filter.h"
85 #include "content/browser/renderer_host/render_message_filter.h" 85 #include "content/browser/renderer_host/render_message_filter.h"
86 #include "content/browser/renderer_host/render_view_host.h" 86 #include "content/browser/renderer_host/render_view_host.h"
87 #include "content/browser/renderer_host/render_view_host_delegate.h" 87 #include "content/browser/renderer_host/render_view_host_delegate.h"
88 #include "content/browser/renderer_host/render_widget_helper.h" 88 #include "content/browser/renderer_host/render_widget_helper.h"
89 #include "content/browser/renderer_host/render_widget_host.h" 89 #include "content/browser/renderer_host/render_widget_host.h"
90 #include "content/browser/renderer_host/resource_message_filter.h" 90 #include "content/browser/renderer_host/resource_message_filter.h"
91 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" 91 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
92 #include "content/browser/speech/speech_input_dispatcher_host.h" 92 #include "content/browser/speech/speech_input_dispatcher_host.h"
93 #include "content/browser/worker_host/worker_message_filter.h" 93 #include "content/browser/worker_host/worker_message_filter.h"
94 #include "content/common/child_process_messages.h"
94 #include "content/common/resource_messages.h" 95 #include "content/common/resource_messages.h"
95 #include "grit/generated_resources.h" 96 #include "grit/generated_resources.h"
96 #include "ipc/ipc_logging.h" 97 #include "ipc/ipc_logging.h"
97 #include "ipc/ipc_platform_file.h" 98 #include "ipc/ipc_platform_file.h"
98 #include "ipc/ipc_switches.h" 99 #include "ipc/ipc_switches.h"
99 #include "media/base/media_switches.h" 100 #include "media/base/media_switches.h"
100 #include "ui/base/ui_base_switches.h" 101 #include "ui/base/ui_base_switches.h"
101 #include "webkit/fileapi/file_system_path_manager.h" 102 #include "webkit/fileapi/file_system_path_manager.h"
102 #include "webkit/plugins/plugin_switches.h" 103 #include "webkit/plugins/plugin_switches.h"
103 104
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 reply->set_reply_error(); 1015 reply->set_reply_error();
1015 Send(reply); 1016 Send(reply);
1016 } 1017 }
1017 return true; 1018 return true;
1018 } 1019 }
1019 return listener->OnMessageReceived(msg); 1020 return listener->OnMessageReceived(msg);
1020 } 1021 }
1021 1022
1022 void BrowserRenderProcessHost::OnChannelConnected(int32 peer_pid) { 1023 void BrowserRenderProcessHost::OnChannelConnected(int32 peer_pid) {
1023 #if defined(IPC_MESSAGE_LOG_ENABLED) 1024 #if defined(IPC_MESSAGE_LOG_ENABLED)
1024 Send(new ViewMsg_SetIPCLoggingEnabled( 1025 Send(new ChildProcessMsg_SetIPCLoggingEnabled(
1025 IPC::Logging::GetInstance()->Enabled())); 1026 IPC::Logging::GetInstance()->Enabled()));
1026 #endif 1027 #endif
1027 } 1028 }
1028 1029
1029 void BrowserRenderProcessHost::OnChannelError() { 1030 void BrowserRenderProcessHost::OnChannelError() {
1030 // Our child process has died. If we didn't expect it, it's a crash. 1031 // Our child process has died. If we didn't expect it, it's a crash.
1031 // In any case, we need to let everyone know it's gone. 1032 // In any case, we need to let everyone know it's gone.
1032 // The OnChannelError notification can fire multiple times due to nested sync 1033 // The OnChannelError notification can fire multiple times due to nested sync
1033 // calls to a renderer. If we don't have a valid channel here it means we 1034 // calls to a renderer. If we don't have a valid channel here it means we
1034 // already handled the error. 1035 // already handled the error.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 IPC::PlatformFileForTransit file; 1286 IPC::PlatformFileForTransit file;
1286 #if defined(OS_POSIX) 1287 #if defined(OS_POSIX)
1287 file = base::FileDescriptor(model_file, false); 1288 file = base::FileDescriptor(model_file, false);
1288 #elif defined(OS_WIN) 1289 #elif defined(OS_WIN)
1289 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1290 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1290 false, DUPLICATE_SAME_ACCESS); 1291 false, DUPLICATE_SAME_ACCESS);
1291 #endif 1292 #endif
1292 Send(new ViewMsg_SetPhishingModel(file)); 1293 Send(new ViewMsg_SetPhishingModel(file));
1293 } 1294 }
1294 } 1295 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/common/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698