| OLD | NEW |
| 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 // 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 "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "base/stl_util.h" | 31 #include "base/stl_util.h" |
| 32 #include "base/strings/string_util.h" | 32 #include "base/strings/string_util.h" |
| 33 #include "base/supports_user_data.h" | 33 #include "base/supports_user_data.h" |
| 34 #include "base/sys_info.h" | 34 #include "base/sys_info.h" |
| 35 #include "base/threading/thread.h" | 35 #include "base/threading/thread.h" |
| 36 #include "base/threading/thread_restrictions.h" | 36 #include "base/threading/thread_restrictions.h" |
| 37 #include "base/tracked_objects.h" | 37 #include "base/tracked_objects.h" |
| 38 #include "cc/base/switches.h" | 38 #include "cc/base/switches.h" |
| 39 #include "content/browser/appcache/appcache_dispatcher_host.h" | 39 #include "content/browser/appcache/appcache_dispatcher_host.h" |
| 40 #include "content/browser/appcache/chrome_appcache_service.h" | 40 #include "content/browser/appcache/chrome_appcache_service.h" |
| 41 #include "content/browser/battery_status/battery_status_message_filter.h" |
| 41 #include "content/browser/browser_child_process_host_impl.h" | 42 #include "content/browser/browser_child_process_host_impl.h" |
| 42 #include "content/browser/browser_main.h" | 43 #include "content/browser/browser_main.h" |
| 43 #include "content/browser/browser_main_loop.h" | 44 #include "content/browser/browser_main_loop.h" |
| 44 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 45 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 45 #include "content/browser/child_process_security_policy_impl.h" | 46 #include "content/browser/child_process_security_policy_impl.h" |
| 46 #include "content/browser/device_sensors/device_motion_message_filter.h" | 47 #include "content/browser/device_sensors/device_motion_message_filter.h" |
| 47 #include "content/browser/device_sensors/device_orientation_message_filter.h" | 48 #include "content/browser/device_sensors/device_orientation_message_filter.h" |
| 48 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 49 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 49 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 50 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
| 50 #include "content/browser/download/mhtml_generation_manager.h" | 51 #include "content/browser/download/mhtml_generation_manager.h" |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 AddFilter(new HistogramMessageFilter()); | 827 AddFilter(new HistogramMessageFilter()); |
| 827 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 828 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 828 if (CommandLine::ForCurrentProcess()->HasSwitch( | 829 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 829 switches::kEnableMemoryBenchmarking)) | 830 switches::kEnableMemoryBenchmarking)) |
| 830 AddFilter(new MemoryBenchmarkMessageFilter()); | 831 AddFilter(new MemoryBenchmarkMessageFilter()); |
| 831 #endif | 832 #endif |
| 832 AddFilter(new VibrationMessageFilter()); | 833 AddFilter(new VibrationMessageFilter()); |
| 833 screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost(); | 834 screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost(); |
| 834 AddFilter(screen_orientation_dispatcher_host_); | 835 AddFilter(screen_orientation_dispatcher_host_); |
| 835 AddFilter(new PushMessagingMessageFilter()); | 836 AddFilter(new PushMessagingMessageFilter()); |
| 837 AddFilter(new BatteryStatusMessageFilter()); |
| 836 } | 838 } |
| 837 | 839 |
| 838 int RenderProcessHostImpl::GetNextRoutingID() { | 840 int RenderProcessHostImpl::GetNextRoutingID() { |
| 839 return widget_helper_->GetNextRoutingID(); | 841 return widget_helper_->GetNextRoutingID(); |
| 840 } | 842 } |
| 841 | 843 |
| 842 | 844 |
| 843 void RenderProcessHostImpl::ResumeDeferredNavigation( | 845 void RenderProcessHostImpl::ResumeDeferredNavigation( |
| 844 const GlobalRequestID& request_id) { | 846 const GlobalRequestID& request_id) { |
| 845 widget_helper_->ResumeDeferredNavigation(request_id); | 847 widget_helper_->ResumeDeferredNavigation(request_id); |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 mojo::ScopedMessagePipeHandle handle) { | 2074 mojo::ScopedMessagePipeHandle handle) { |
| 2073 mojo_activation_required_ = true; | 2075 mojo_activation_required_ = true; |
| 2074 MaybeActivateMojo(); | 2076 MaybeActivateMojo(); |
| 2075 | 2077 |
| 2076 mojo::AllocationScope scope; | 2078 mojo::AllocationScope scope; |
| 2077 mojo_application_host_->shell_client()->AcceptConnection(service_name, | 2079 mojo_application_host_->shell_client()->AcceptConnection(service_name, |
| 2078 handle.Pass()); | 2080 handle.Pass()); |
| 2079 } | 2081 } |
| 2080 | 2082 |
| 2081 } // namespace content | 2083 } // namespace content |
| OLD | NEW |