OLD | NEW |
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 23 matching lines...) Expand all Loading... |
34 #include "chrome/browser/extensions/user_script_master.h" | 34 #include "chrome/browser/extensions/user_script_master.h" |
35 #include "chrome/browser/gpu_data_manager.h" | 35 #include "chrome/browser/gpu_data_manager.h" |
36 #include "chrome/browser/history/history.h" | 36 #include "chrome/browser/history/history.h" |
37 #include "chrome/browser/io_thread.h" | 37 #include "chrome/browser/io_thread.h" |
38 #include "chrome/browser/metrics/user_metrics.h" | 38 #include "chrome/browser/metrics/user_metrics.h" |
39 #include "chrome/browser/net/resolve_proxy_msg_helper.h" | 39 #include "chrome/browser/net/resolve_proxy_msg_helper.h" |
40 #include "chrome/browser/platform_util.h" | 40 #include "chrome/browser/platform_util.h" |
41 #include "chrome/browser/printing/printing_message_filter.h" | 41 #include "chrome/browser/printing/printing_message_filter.h" |
42 #include "chrome/browser/profiles/profile.h" | 42 #include "chrome/browser/profiles/profile.h" |
43 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 43 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
| 44 #include "chrome/browser/renderer_host/text_input_client_message_filter.h" |
44 #include "chrome/browser/renderer_host/web_cache_manager.h" | 45 #include "chrome/browser/renderer_host/web_cache_manager.h" |
45 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 46 #include "chrome/browser/safe_browsing/client_side_detection_service.h" |
46 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" | 47 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" |
47 #include "chrome/browser/spellcheck_host.h" | 48 #include "chrome/browser/spellcheck_host.h" |
48 #include "chrome/browser/spellcheck_message_filter.h" | 49 #include "chrome/browser/spellcheck_message_filter.h" |
49 #include "chrome/browser/metrics/user_metrics.h" | 50 #include "chrome/browser/metrics/user_metrics.h" |
50 #include "chrome/browser/visitedlink/visitedlink_master.h" | 51 #include "chrome/browser/visitedlink/visitedlink_master.h" |
51 #include "chrome/common/chrome_paths.h" | 52 #include "chrome/common/chrome_paths.h" |
52 #include "chrome/common/chrome_switches.h" | 53 #include "chrome/common/chrome_switches.h" |
53 #include "chrome/common/extensions/extension.h" | 54 #include "chrome/common/extensions/extension.h" |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 profile()->GetRequestContext(), | 510 profile()->GetRequestContext(), |
510 g_browser_process->resource_dispatcher_host(), | 511 g_browser_process->resource_dispatcher_host(), |
511 NewCallbackWithReturnValue( | 512 NewCallbackWithReturnValue( |
512 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); | 513 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); |
513 | 514 |
514 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) | 515 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) |
515 channel_->AddFilter(new P2PSocketsHost()); | 516 channel_->AddFilter(new P2PSocketsHost()); |
516 | 517 |
517 channel_->AddFilter(new TraceMessageFilter()); | 518 channel_->AddFilter(new TraceMessageFilter()); |
518 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); | 519 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); |
| 520 #if defined(OS_MACOSX) |
| 521 channel_->AddFilter(new TextInputClientMessageFilter(id())); |
| 522 #endif |
519 } | 523 } |
520 | 524 |
521 int BrowserRenderProcessHost::GetNextRoutingID() { | 525 int BrowserRenderProcessHost::GetNextRoutingID() { |
522 return widget_helper_->GetNextRoutingID(); | 526 return widget_helper_->GetNextRoutingID(); |
523 } | 527 } |
524 | 528 |
525 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { | 529 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { |
526 widget_helper_->CancelResourceRequests(render_widget_id); | 530 widget_helper_->CancelResourceRequests(render_widget_id); |
527 } | 531 } |
528 | 532 |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 IPC::PlatformFileForTransit file; | 1320 IPC::PlatformFileForTransit file; |
1317 #if defined(OS_POSIX) | 1321 #if defined(OS_POSIX) |
1318 file = base::FileDescriptor(model_file, false); | 1322 file = base::FileDescriptor(model_file, false); |
1319 #elif defined(OS_WIN) | 1323 #elif defined(OS_WIN) |
1320 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1324 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
1321 false, DUPLICATE_SAME_ACCESS); | 1325 false, DUPLICATE_SAME_ACCESS); |
1322 #endif | 1326 #endif |
1323 Send(new SafeBrowsingMsg_SetPhishingModel(file)); | 1327 Send(new SafeBrowsingMsg_SetPhishingModel(file)); |
1324 } | 1328 } |
1325 } | 1329 } |
OLD | NEW |