Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2196843003: Blink ServiceRegistry -> InterfaceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 frame_binding_(this), 1120 frame_binding_(this),
1121 weak_factory_(this) { 1121 weak_factory_(this) {
1122 // We don't have a shell::Connection at this point, so use nullptr. 1122 // We don't have a shell::Connection at this point, so use nullptr.
1123 // 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
1124 // interfaces get exposed. 1124 // interfaces get exposed.
1125 interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); 1125 interface_registry_.reset(new shell::InterfaceRegistry(nullptr));
1126 shell::mojom::InterfaceProviderPtr remote_interfaces; 1126 shell::mojom::InterfaceProviderPtr remote_interfaces;
1127 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); 1127 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces);
1128 remote_interfaces_.reset(new shell::InterfaceProvider); 1128 remote_interfaces_.reset(new shell::InterfaceProvider);
1129 remote_interfaces_->Bind(std::move(remote_interfaces)); 1129 remote_interfaces_->Bind(std::move(remote_interfaces));
1130 blink_service_registry_.reset(new BlinkServiceRegistryImpl( 1130 blink_interface_provider_.reset(new BlinkInterfaceProviderImpl(
1131 remote_interfaces_->GetWeakPtr())); 1131 remote_interfaces_->GetWeakPtr()));
1132 1132
1133 std::pair<RoutingIDFrameMap::iterator, bool> result = 1133 std::pair<RoutingIDFrameMap::iterator, bool> result =
1134 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this)); 1134 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this));
1135 CHECK(result.second) << "Inserting a duplicate item."; 1135 CHECK(result.second) << "Inserting a duplicate item.";
1136 1136
1137 RenderThread::Get()->AddRoute(routing_id_, this); 1137 RenderThread::Get()->AddRoute(routing_id_, this);
1138 1138
1139 render_view_->RegisterRenderFrame(this); 1139 render_view_->RegisterRenderFrame(this);
1140 1140
(...skipping 5063 matching lines...) Expand 10 before | Expand all | Expand 10 after
6204 const blink::WebString& sink_id, 6204 const blink::WebString& sink_id,
6205 const blink::WebSecurityOrigin& security_origin, 6205 const blink::WebSecurityOrigin& security_origin,
6206 blink::WebSetSinkIdCallbacks* web_callbacks) { 6206 blink::WebSetSinkIdCallbacks* web_callbacks) {
6207 media::OutputDeviceStatusCB callback = 6207 media::OutputDeviceStatusCB callback =
6208 media::ConvertToOutputDeviceStatusCB(web_callbacks); 6208 media::ConvertToOutputDeviceStatusCB(web_callbacks);
6209 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo( 6209 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo(
6210 routing_id_, 0, sink_id.utf8(), security_origin) 6210 routing_id_, 0, sink_id.utf8(), security_origin)
6211 .device_status()); 6211 .device_status());
6212 } 6212 }
6213 6213
6214 blink::ServiceRegistry* RenderFrameImpl::serviceRegistry() { 6214 blink::InterfaceProvider* RenderFrameImpl::interfaceProvider() {
6215 return blink_service_registry_.get(); 6215 return blink_interface_provider_.get();
6216 } 6216 }
6217 6217
6218 blink::WebPageVisibilityState RenderFrameImpl::visibilityState() const { 6218 blink::WebPageVisibilityState RenderFrameImpl::visibilityState() const {
6219 RenderFrameImpl* local_root = 6219 RenderFrameImpl* local_root =
6220 RenderFrameImpl::FromWebFrame(frame_->localRoot()); 6220 RenderFrameImpl::FromWebFrame(frame_->localRoot());
6221 blink::WebPageVisibilityState current_state = 6221 blink::WebPageVisibilityState current_state =
6222 local_root->render_widget_->is_hidden() 6222 local_root->render_widget_->is_hidden()
6223 ? blink::WebPageVisibilityStateHidden 6223 ? blink::WebPageVisibilityStateHidden
6224 : blink::WebPageVisibilityStateVisible; 6224 : blink::WebPageVisibilityStateVisible;
6225 blink::WebPageVisibilityState override_state = current_state; 6225 blink::WebPageVisibilityState override_state = current_state;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
6346 // event target. Potentially a Pepper plugin will receive the event. 6346 // event target. Potentially a Pepper plugin will receive the event.
6347 // In order to tell whether a plugin gets the last mouse event and which it 6347 // In order to tell whether a plugin gets the last mouse event and which it
6348 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6348 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6349 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6349 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6350 // |pepper_last_mouse_event_target_|. 6350 // |pepper_last_mouse_event_target_|.
6351 pepper_last_mouse_event_target_ = nullptr; 6351 pepper_last_mouse_event_target_ = nullptr;
6352 #endif 6352 #endif
6353 } 6353 }
6354 6354
6355 } // namespace content 6355 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698