| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 #include "content/public/browser/notification_service.h" | 144 #include "content/public/browser/notification_service.h" |
| 145 #include "content/public/browser/notification_types.h" | 145 #include "content/public/browser/notification_types.h" |
| 146 #include "content/public/browser/render_process_host_factory.h" | 146 #include "content/public/browser/render_process_host_factory.h" |
| 147 #include "content/public/browser/render_process_host_observer.h" | 147 #include "content/public/browser/render_process_host_observer.h" |
| 148 #include "content/public/browser/render_widget_host.h" | 148 #include "content/public/browser/render_widget_host.h" |
| 149 #include "content/public/browser/render_widget_host_iterator.h" | 149 #include "content/public/browser/render_widget_host_iterator.h" |
| 150 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" | 150 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" |
| 151 #include "content/public/browser/resource_context.h" | 151 #include "content/public/browser/resource_context.h" |
| 152 #include "content/public/browser/user_metrics.h" | 152 #include "content/public/browser/user_metrics.h" |
| 153 #include "content/public/browser/worker_service.h" | 153 #include "content/public/browser/worker_service.h" |
| 154 #include "content/public/common/associated_interface_provider.h" |
| 154 #include "content/public/common/child_process_host.h" | 155 #include "content/public/common/child_process_host.h" |
| 155 #include "content/public/common/connection_filter.h" | 156 #include "content/public/common/connection_filter.h" |
| 156 #include "content/public/common/content_constants.h" | 157 #include "content/public/common/content_constants.h" |
| 157 #include "content/public/common/content_features.h" | 158 #include "content/public/common/content_features.h" |
| 158 #include "content/public/common/content_switches.h" | 159 #include "content/public/common/content_switches.h" |
| 159 #include "content/public/common/mojo_channel_switches.h" | 160 #include "content/public/common/mojo_channel_switches.h" |
| 160 #include "content/public/common/process_type.h" | 161 #include "content/public/common/process_type.h" |
| 161 #include "content/public/common/resource_type.h" | 162 #include "content/public/common/resource_type.h" |
| 162 #include "content/public/common/result_codes.h" | 163 #include "content/public/common/result_codes.h" |
| 163 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 164 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 void RenderProcessHostImpl::ResumeDeferredNavigation( | 1358 void RenderProcessHostImpl::ResumeDeferredNavigation( |
| 1358 const GlobalRequestID& request_id) { | 1359 const GlobalRequestID& request_id) { |
| 1359 widget_helper_->ResumeDeferredNavigation(request_id); | 1360 widget_helper_->ResumeDeferredNavigation(request_id); |
| 1360 } | 1361 } |
| 1361 | 1362 |
| 1362 service_manager::InterfaceProvider* | 1363 service_manager::InterfaceProvider* |
| 1363 RenderProcessHostImpl::GetRemoteInterfaces() { | 1364 RenderProcessHostImpl::GetRemoteInterfaces() { |
| 1364 return child_connection_->GetRemoteInterfaces(); | 1365 return child_connection_->GetRemoteInterfaces(); |
| 1365 } | 1366 } |
| 1366 | 1367 |
| 1368 content::AssociatedInterfaceProvider* |
| 1369 RenderProcessHostImpl::GetAssociatedInterfaceProviderForTesting() { |
| 1370 return nullptr; |
| 1371 } |
| 1372 |
| 1367 std::unique_ptr<base::SharedPersistentMemoryAllocator> | 1373 std::unique_ptr<base::SharedPersistentMemoryAllocator> |
| 1368 RenderProcessHostImpl::TakeMetricsAllocator() { | 1374 RenderProcessHostImpl::TakeMetricsAllocator() { |
| 1369 return std::move(metrics_allocator_); | 1375 return std::move(metrics_allocator_); |
| 1370 } | 1376 } |
| 1371 | 1377 |
| 1372 const base::TimeTicks& RenderProcessHostImpl::GetInitTimeForNavigationMetrics() | 1378 const base::TimeTicks& RenderProcessHostImpl::GetInitTimeForNavigationMetrics() |
| 1373 const { | 1379 const { |
| 1374 return init_time_; | 1380 return init_time_; |
| 1375 } | 1381 } |
| 1376 | 1382 |
| (...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3013 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3019 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3014 | 3020 |
| 3015 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3021 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3016 // Capture the error message in a crash key value. | 3022 // Capture the error message in a crash key value. |
| 3017 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3023 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3018 bad_message::ReceivedBadMessage(render_process_id, | 3024 bad_message::ReceivedBadMessage(render_process_id, |
| 3019 bad_message::RPH_MOJO_PROCESS_ERROR); | 3025 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3020 } | 3026 } |
| 3021 | 3027 |
| 3022 } // namespace content | 3028 } // namespace content |
| OLD | NEW |