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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 is_pasting_(false), | 1111 is_pasting_(false), |
1112 suppress_further_dialogs_(false), | 1112 suppress_further_dialogs_(false), |
1113 blame_context_(nullptr), | 1113 blame_context_(nullptr), |
1114 #if defined(ENABLE_PLUGINS) | 1114 #if defined(ENABLE_PLUGINS) |
1115 focused_pepper_plugin_(nullptr), | 1115 focused_pepper_plugin_(nullptr), |
1116 pepper_last_mouse_event_target_(nullptr), | 1116 pepper_last_mouse_event_target_(nullptr), |
1117 #endif | 1117 #endif |
1118 frame_binding_(this), | 1118 frame_binding_(this), |
1119 has_accessed_initial_document_(false), | 1119 has_accessed_initial_document_(false), |
1120 weak_factory_(this) { | 1120 weak_factory_(this) { |
1121 // We don't have a service_manager::Connection at this point, so use nullptr. | 1121 // We don't have a service_manager::Connection at this point, so use empty |
| 1122 // identity/specs. |
1122 // TODO(beng): We should fix this, so we can apply policy about which | 1123 // TODO(beng): We should fix this, so we can apply policy about which |
1123 // interfaces get exposed. | 1124 // interfaces get exposed. |
1124 interface_registry_.reset(new service_manager::InterfaceRegistry); | 1125 interface_registry_ = base::MakeUnique<service_manager::InterfaceRegistry>( |
| 1126 service_manager::Identity(), service_manager::InterfaceProviderSpec()); |
1125 service_manager::mojom::InterfaceProviderPtr remote_interfaces; | 1127 service_manager::mojom::InterfaceProviderPtr remote_interfaces; |
1126 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); | 1128 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); |
1127 remote_interfaces_.reset(new service_manager::InterfaceProvider); | 1129 remote_interfaces_.reset(new service_manager::InterfaceProvider); |
1128 remote_interfaces_->Bind(std::move(remote_interfaces)); | 1130 remote_interfaces_->Bind(std::move(remote_interfaces)); |
1129 blink_interface_provider_.reset(new BlinkInterfaceProviderImpl( | 1131 blink_interface_provider_.reset(new BlinkInterfaceProviderImpl( |
1130 remote_interfaces_->GetWeakPtr())); | 1132 remote_interfaces_->GetWeakPtr())); |
1131 blink_interface_registry_.reset( | 1133 blink_interface_registry_.reset( |
1132 new BlinkInterfaceRegistryImpl(interface_registry_->GetWeakPtr())); | 1134 new BlinkInterfaceRegistryImpl(interface_registry_->GetWeakPtr())); |
1133 | 1135 |
1134 std::pair<RoutingIDFrameMap::iterator, bool> result = | 1136 std::pair<RoutingIDFrameMap::iterator, bool> result = |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2623 } | 2625 } |
2624 | 2626 |
2625 bool RenderFrameImpl::IsPasting() const { | 2627 bool RenderFrameImpl::IsPasting() const { |
2626 return is_pasting_; | 2628 return is_pasting_; |
2627 } | 2629 } |
2628 | 2630 |
2629 // mojom::Frame implementation ------------------------------------------------- | 2631 // mojom::Frame implementation ------------------------------------------------- |
2630 | 2632 |
2631 void RenderFrameImpl::GetInterfaceProvider( | 2633 void RenderFrameImpl::GetInterfaceProvider( |
2632 service_manager::mojom::InterfaceProviderRequest request) { | 2634 service_manager::mojom::InterfaceProviderRequest request) { |
2633 interface_registry_->Bind(std::move(request)); | 2635 interface_registry_->Bind(std::move(request), |
| 2636 service_manager::Identity(), |
| 2637 service_manager::InterfaceProviderSpec()); |
2634 } | 2638 } |
2635 | 2639 |
2636 // blink::WebFrameClient implementation ---------------------------------------- | 2640 // blink::WebFrameClient implementation ---------------------------------------- |
2637 | 2641 |
2638 blink::WebPlugin* RenderFrameImpl::createPlugin( | 2642 blink::WebPlugin* RenderFrameImpl::createPlugin( |
2639 blink::WebLocalFrame* frame, | 2643 blink::WebLocalFrame* frame, |
2640 const blink::WebPluginParams& params) { | 2644 const blink::WebPluginParams& params) { |
2641 DCHECK_EQ(frame_, frame); | 2645 DCHECK_EQ(frame_, frame); |
2642 blink::WebPlugin* plugin = NULL; | 2646 blink::WebPlugin* plugin = NULL; |
2643 if (GetContentClient()->renderer()->OverrideCreatePlugin( | 2647 if (GetContentClient()->renderer()->OverrideCreatePlugin( |
(...skipping 3935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6579 // event target. Potentially a Pepper plugin will receive the event. | 6583 // event target. Potentially a Pepper plugin will receive the event. |
6580 // In order to tell whether a plugin gets the last mouse event and which it | 6584 // In order to tell whether a plugin gets the last mouse event and which it |
6581 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6585 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6582 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6586 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6583 // |pepper_last_mouse_event_target_|. | 6587 // |pepper_last_mouse_event_target_|. |
6584 pepper_last_mouse_event_target_ = nullptr; | 6588 pepper_last_mouse_event_target_ = nullptr; |
6585 #endif | 6589 #endif |
6586 } | 6590 } |
6587 | 6591 |
6588 } // namespace content | 6592 } // namespace content |
OLD | NEW |