Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 #include "content/child/service_worker/service_worker_handle_reference.h" | 39 #include "content/child/service_worker/service_worker_handle_reference.h" |
| 40 #include "content/child/service_worker/service_worker_network_provider.h" | 40 #include "content/child/service_worker/service_worker_network_provider.h" |
| 41 #include "content/child/service_worker/service_worker_provider_context.h" | 41 #include "content/child/service_worker/service_worker_provider_context.h" |
| 42 #include "content/child/service_worker/web_service_worker_provider_impl.h" | 42 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
| 43 #include "content/child/v8_value_converter_impl.h" | 43 #include "content/child/v8_value_converter_impl.h" |
| 44 #include "content/child/web_url_loader_impl.h" | 44 #include "content/child/web_url_loader_impl.h" |
| 45 #include "content/child/web_url_request_util.h" | 45 #include "content/child/web_url_request_util.h" |
| 46 #include "content/child/webmessageportchannel_impl.h" | 46 #include "content/child/webmessageportchannel_impl.h" |
| 47 #include "content/child/weburlresponse_extradata_impl.h" | 47 #include "content/child/weburlresponse_extradata_impl.h" |
| 48 #include "content/common/accessibility_messages.h" | 48 #include "content/common/accessibility_messages.h" |
| 49 #include "content/common/associated_interface_provider_impl.h" | |
| 49 #include "content/common/clipboard_messages.h" | 50 #include "content/common/clipboard_messages.h" |
| 50 #include "content/common/content_constants_internal.h" | 51 #include "content/common/content_constants_internal.h" |
| 51 #include "content/common/content_security_policy_header.h" | 52 #include "content/common/content_security_policy_header.h" |
| 52 #include "content/common/frame_messages.h" | 53 #include "content/common/frame_messages.h" |
| 53 #include "content/common/frame_owner_properties.h" | 54 #include "content/common/frame_owner_properties.h" |
| 54 #include "content/common/frame_replication_state.h" | 55 #include "content/common/frame_replication_state.h" |
| 55 #include "content/common/gpu/client/context_provider_command_buffer.h" | 56 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 56 #include "content/common/input_messages.h" | 57 #include "content/common/input_messages.h" |
| 57 #include "content/common/navigation_params.h" | 58 #include "content/common/navigation_params.h" |
| 58 #include "content/common/page_messages.h" | 59 #include "content/common/page_messages.h" |
| (...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2395 } | 2396 } |
| 2396 | 2397 |
| 2397 shell::InterfaceRegistry* RenderFrameImpl::GetInterfaceRegistry() { | 2398 shell::InterfaceRegistry* RenderFrameImpl::GetInterfaceRegistry() { |
| 2398 return interface_registry_.get(); | 2399 return interface_registry_.get(); |
| 2399 } | 2400 } |
| 2400 | 2401 |
| 2401 shell::InterfaceProvider* RenderFrameImpl::GetRemoteInterfaces() { | 2402 shell::InterfaceProvider* RenderFrameImpl::GetRemoteInterfaces() { |
| 2402 return remote_interfaces_.get(); | 2403 return remote_interfaces_.get(); |
| 2403 } | 2404 } |
| 2404 | 2405 |
| 2406 AssociatedInterfaceRegistry* | |
| 2407 RenderFrameImpl::GetAssociatedInterfaceRegistry() { | |
| 2408 return &associated_interfaces_; | |
| 2409 } | |
| 2410 | |
| 2411 AssociatedInterfaceProvider* | |
| 2412 RenderFrameImpl::GetRemoteAssociatedInterfaces() { | |
| 2413 if (!remote_associated_interfaces_) { | |
| 2414 ChildThreadImpl* thread = ChildThreadImpl::current(); | |
| 2415 mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces; | |
| 2416 thread->GetRemoteRouteProvider()->GetRoute( | |
| 2417 GetRoutingID(), | |
|
jam
2016/09/14 17:05:06
nit: usually RF just uses routing_id_ instead of t
| |
| 2418 mojo::GetProxy(&remote_interfaces, | |
| 2419 thread->channel()->GetAssociatedGroup())); | |
| 2420 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( | |
| 2421 std::move(remote_interfaces))); | |
| 2422 } | |
| 2423 return remote_associated_interfaces_.get(); | |
| 2424 } | |
| 2425 | |
| 2405 #if defined(ENABLE_PLUGINS) | 2426 #if defined(ENABLE_PLUGINS) |
| 2406 void RenderFrameImpl::RegisterPeripheralPlugin( | 2427 void RenderFrameImpl::RegisterPeripheralPlugin( |
| 2407 const url::Origin& content_origin, | 2428 const url::Origin& content_origin, |
| 2408 const base::Closure& unthrottle_callback) { | 2429 const base::Closure& unthrottle_callback) { |
| 2409 return plugin_power_saver_helper_->RegisterPeripheralPlugin( | 2430 return plugin_power_saver_helper_->RegisterPeripheralPlugin( |
| 2410 content_origin, unthrottle_callback); | 2431 content_origin, unthrottle_callback); |
| 2411 } | 2432 } |
| 2412 | 2433 |
| 2413 RenderFrame::PeripheralContentStatus | 2434 RenderFrame::PeripheralContentStatus |
| 2414 RenderFrameImpl::GetPeripheralContentStatus( | 2435 RenderFrameImpl::GetPeripheralContentStatus( |
| (...skipping 3930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6345 // event target. Potentially a Pepper plugin will receive the event. | 6366 // event target. Potentially a Pepper plugin will receive the event. |
| 6346 // In order to tell whether a plugin gets the last mouse event and which it | 6367 // In order to tell whether a plugin gets the last mouse event and which it |
| 6347 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6368 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6348 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6369 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6349 // |pepper_last_mouse_event_target_|. | 6370 // |pepper_last_mouse_event_target_|. |
| 6350 pepper_last_mouse_event_target_ = nullptr; | 6371 pepper_last_mouse_event_target_ = nullptr; |
| 6351 #endif | 6372 #endif |
| 6352 } | 6373 } |
| 6353 | 6374 |
| 6354 } // namespace content | 6375 } // namespace content |
| OLD | NEW |