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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 host_zoom_binding_(this), 1127 host_zoom_binding_(this),
1128 has_accessed_initial_document_(false), 1128 has_accessed_initial_document_(false),
1129 weak_factory_(this) { 1129 weak_factory_(this) {
1130 // We don't have a service_manager::Connection at this point, so use empty 1130 // We don't have a service_manager::Connection at this point, so use empty
1131 // identity/specs. 1131 // identity/specs.
1132 // TODO(beng): We should fix this, so we can apply policy about which 1132 // TODO(beng): We should fix this, so we can apply policy about which
1133 // interfaces get exposed. 1133 // interfaces get exposed.
1134 interface_registry_ = base::MakeUnique<service_manager::InterfaceRegistry>( 1134 interface_registry_ = base::MakeUnique<service_manager::InterfaceRegistry>(
1135 mojom::kNavigation_FrameSpec); 1135 mojom::kNavigation_FrameSpec);
1136 service_manager::mojom::InterfaceProviderPtr remote_interfaces; 1136 service_manager::mojom::InterfaceProviderPtr remote_interfaces;
1137 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); 1137 pending_remote_interface_provider_request_ = MakeRequest(&remote_interfaces);
1138 remote_interfaces_.reset(new service_manager::InterfaceProvider); 1138 remote_interfaces_.reset(new service_manager::InterfaceProvider);
1139 remote_interfaces_->Bind(std::move(remote_interfaces)); 1139 remote_interfaces_->Bind(std::move(remote_interfaces));
1140 blink_interface_provider_.reset(new BlinkInterfaceProviderImpl( 1140 blink_interface_provider_.reset(new BlinkInterfaceProviderImpl(
1141 remote_interfaces_->GetWeakPtr())); 1141 remote_interfaces_->GetWeakPtr()));
1142 blink_interface_registry_.reset( 1142 blink_interface_registry_.reset(
1143 new BlinkInterfaceRegistryImpl(interface_registry_->GetWeakPtr())); 1143 new BlinkInterfaceRegistryImpl(interface_registry_->GetWeakPtr()));
1144 1144
1145 std::pair<RoutingIDFrameMap::iterator, bool> result = 1145 std::pair<RoutingIDFrameMap::iterator, bool> result =
1146 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this)); 1146 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this));
1147 CHECK(result.second) << "Inserting a duplicate item."; 1147 CHECK(result.second) << "Inserting a duplicate item.";
(...skipping 12 matching lines...) Expand all
1160 // Manages its own lifetime. 1160 // Manages its own lifetime.
1161 plugin_power_saver_helper_ = new PluginPowerSaverHelper(this); 1161 plugin_power_saver_helper_ = new PluginPowerSaverHelper(this);
1162 #endif 1162 #endif
1163 1163
1164 manifest_manager_ = new ManifestManager(this); 1164 manifest_manager_ = new ManifestManager(this);
1165 1165
1166 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 1166 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
1167 // Create the RemotingSinkObserver to monitor the remoting sink availablity. 1167 // Create the RemotingSinkObserver to monitor the remoting sink availablity.
1168 media::mojom::RemotingSourcePtr remoting_source; 1168 media::mojom::RemotingSourcePtr remoting_source;
1169 media::mojom::RemotingSourceRequest remoting_source_request = 1169 media::mojom::RemotingSourceRequest remoting_source_request =
1170 mojo::GetProxy(&remoting_source); 1170 mojo::MakeRequest(&remoting_source);
1171 media::mojom::RemoterPtr remoter; 1171 media::mojom::RemoterPtr remoter;
1172 GetRemoterFactory()->Create(std::move(remoting_source), 1172 GetRemoterFactory()->Create(std::move(remoting_source),
1173 mojo::GetProxy(&remoter)); 1173 mojo::MakeRequest(&remoter));
1174 remoting_sink_observer_ = base::MakeUnique<media::RemotingSinkObserver>( 1174 remoting_sink_observer_ = base::MakeUnique<media::RemotingSinkObserver>(
1175 std::move(remoting_source_request), std::move(remoter)); 1175 std::move(remoting_source_request), std::move(remoter));
1176 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 1176 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
1177 } 1177 }
1178 1178
1179 RenderFrameImpl::~RenderFrameImpl() { 1179 RenderFrameImpl::~RenderFrameImpl() {
1180 // If file chooser is still waiting for answer, dispatch empty answer. 1180 // If file chooser is still waiting for answer, dispatch empty answer.
1181 while (!file_chooser_completions_.empty()) { 1181 while (!file_chooser_completions_.empty()) {
1182 if (file_chooser_completions_.front()->completion) { 1182 if (file_chooser_completions_.front()->completion) {
1183 file_chooser_completions_.front()->completion->didChooseFile( 1183 file_chooser_completions_.front()->completion->didChooseFile(
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 return &associated_interfaces_; 2526 return &associated_interfaces_;
2527 } 2527 }
2528 2528
2529 AssociatedInterfaceProvider* 2529 AssociatedInterfaceProvider*
2530 RenderFrameImpl::GetRemoteAssociatedInterfaces() { 2530 RenderFrameImpl::GetRemoteAssociatedInterfaces() {
2531 if (!remote_associated_interfaces_) { 2531 if (!remote_associated_interfaces_) {
2532 ChildThreadImpl* thread = ChildThreadImpl::current(); 2532 ChildThreadImpl* thread = ChildThreadImpl::current();
2533 if (thread) { 2533 if (thread) {
2534 mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces; 2534 mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces;
2535 thread->GetRemoteRouteProvider()->GetRoute( 2535 thread->GetRemoteRouteProvider()->GetRoute(
2536 routing_id_, mojo::GetProxy(&remote_interfaces, 2536 routing_id_,
2537 thread->channel()->GetAssociatedGroup())); 2537 mojo::MakeRequest(&remote_interfaces,
2538 thread->channel()->GetAssociatedGroup()));
2538 remote_associated_interfaces_.reset( 2539 remote_associated_interfaces_.reset(
2539 new AssociatedInterfaceProviderImpl(std::move(remote_interfaces))); 2540 new AssociatedInterfaceProviderImpl(std::move(remote_interfaces)));
2540 } else { 2541 } else {
2541 // In some tests the thread may be null, 2542 // In some tests the thread may be null,
2542 // so set up a self-contained interface provider instead. 2543 // so set up a self-contained interface provider instead.
2543 remote_associated_interfaces_.reset( 2544 remote_associated_interfaces_.reset(
2544 new AssociatedInterfaceProviderImpl()); 2545 new AssociatedInterfaceProviderImpl());
2545 } 2546 }
2546 } 2547 }
2547 return remote_associated_interfaces_.get(); 2548 return remote_associated_interfaces_.get();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
2744 #else 2745 #else
2745 return NULL; 2746 return NULL;
2746 #endif // BUILDFLAG(ENABLE_PLUGINS) 2747 #endif // BUILDFLAG(ENABLE_PLUGINS)
2747 } 2748 }
2748 2749
2749 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 2750 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
2750 std::unique_ptr<media::RemotingRendererController> 2751 std::unique_ptr<media::RemotingRendererController>
2751 RenderFrameImpl::CreateRemotingRendererController() { 2752 RenderFrameImpl::CreateRemotingRendererController() {
2752 media::mojom::RemotingSourcePtr remoting_source; 2753 media::mojom::RemotingSourcePtr remoting_source;
2753 media::mojom::RemotingSourceRequest remoting_source_request = 2754 media::mojom::RemotingSourceRequest remoting_source_request =
2754 mojo::GetProxy(&remoting_source); 2755 mojo::MakeRequest(&remoting_source);
2755 media::mojom::RemoterPtr remoter; 2756 media::mojom::RemoterPtr remoter;
2756 GetRemoterFactory()->Create(std::move(remoting_source), 2757 GetRemoterFactory()->Create(std::move(remoting_source),
2757 mojo::GetProxy(&remoter)); 2758 mojo::MakeRequest(&remoter));
2758 return base::MakeUnique<media::RemotingRendererController>( 2759 return base::MakeUnique<media::RemotingRendererController>(
2759 make_scoped_refptr(new media::RemotingSourceImpl( 2760 make_scoped_refptr(new media::RemotingSourceImpl(
2760 std::move(remoting_source_request), std::move(remoter)))); 2761 std::move(remoting_source_request), std::move(remoter))));
2761 } 2762 }
2762 #endif 2763 #endif
2763 2764
2764 blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( 2765 blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer(
2765 const blink::WebMediaPlayerSource& source, 2766 const blink::WebMediaPlayerSource& source,
2766 WebMediaPlayerClient* client, 2767 WebMediaPlayerClient* client,
2767 WebMediaPlayerEncryptedMediaClient* encrypted_client, 2768 WebMediaPlayerEncryptedMediaClient* encrypted_client,
(...skipping 3958 matching lines...) Expand 10 before | Expand all | Expand 10 after
6726 // event target. Potentially a Pepper plugin will receive the event. 6727 // event target. Potentially a Pepper plugin will receive the event.
6727 // In order to tell whether a plugin gets the last mouse event and which it 6728 // In order to tell whether a plugin gets the last mouse event and which it
6728 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6729 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6729 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6730 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6730 // |pepper_last_mouse_event_target_|. 6731 // |pepper_last_mouse_event_target_|.
6731 pepper_last_mouse_event_target_ = nullptr; 6732 pepper_last_mouse_event_target_ = nullptr;
6732 #endif 6733 #endif
6733 } 6734 }
6734 6735
6735 } // namespace content 6736 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_media_device_manager.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698