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

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

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Rebase + response to review 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 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 #if BUILDFLAG(ENABLE_PLUGINS) 1159 #if BUILDFLAG(ENABLE_PLUGINS)
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(&remoting_source);
1170 mojo::MakeRequest(&remoting_source);
1171 media::mojom::RemoterPtr remoter; 1170 media::mojom::RemoterPtr remoter;
1172 GetRemoterFactory()->Create(std::move(remoting_source), 1171 GetRemoterFactory()->Create(std::move(remoting_source),
1173 mojo::MakeRequest(&remoter)); 1172 mojo::MakeRequest(&remoter));
1174 remoting_sink_observer_ = base::MakeUnique<media::RemotingSinkObserver>( 1173 remoting_sink_observer_ = base::MakeUnique<media::RemotingSinkObserver>(
1175 std::move(remoting_source_request), std::move(remoter)); 1174 std::move(remoting_source_request), std::move(remoter));
1176 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 1175 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
1177 } 1176 }
1178 1177
1179 RenderFrameImpl::~RenderFrameImpl() { 1178 RenderFrameImpl::~RenderFrameImpl() {
1180 // If file chooser is still waiting for answer, dispatch empty answer. 1179 // If file chooser is still waiting for answer, dispatch empty answer.
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2744 return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */); 2743 return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */);
2745 #else 2744 #else
2746 return NULL; 2745 return NULL;
2747 #endif // BUILDFLAG(ENABLE_PLUGINS) 2746 #endif // BUILDFLAG(ENABLE_PLUGINS)
2748 } 2747 }
2749 2748
2750 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 2749 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
2751 std::unique_ptr<media::RemotingRendererController> 2750 std::unique_ptr<media::RemotingRendererController>
2752 RenderFrameImpl::CreateRemotingRendererController() { 2751 RenderFrameImpl::CreateRemotingRendererController() {
2753 media::mojom::RemotingSourcePtr remoting_source; 2752 media::mojom::RemotingSourcePtr remoting_source;
2754 media::mojom::RemotingSourceRequest remoting_source_request = 2753 media::mojom::RemotingSourceRequest remoting_source_request(&remoting_source);
2755 mojo::MakeRequest(&remoting_source);
2756 media::mojom::RemoterPtr remoter; 2754 media::mojom::RemoterPtr remoter;
2757 GetRemoterFactory()->Create(std::move(remoting_source), 2755 GetRemoterFactory()->Create(std::move(remoting_source),
2758 mojo::MakeRequest(&remoter)); 2756 mojo::MakeRequest(&remoter));
2759 return base::MakeUnique<media::RemotingRendererController>( 2757 return base::MakeUnique<media::RemotingRendererController>(
2760 make_scoped_refptr(new media::RemotingSourceImpl( 2758 make_scoped_refptr(new media::RemotingSourceImpl(
2761 std::move(remoting_source_request), std::move(remoter)))); 2759 std::move(remoting_source_request), std::move(remoter))));
2762 } 2760 }
2763 #endif 2761 #endif
2764 2762
2765 blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( 2763 blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer(
(...skipping 3961 matching lines...) Expand 10 before | Expand all | Expand 10 after
6727 // event target. Potentially a Pepper plugin will receive the event. 6725 // event target. Potentially a Pepper plugin will receive the event.
6728 // In order to tell whether a plugin gets the last mouse event and which it 6726 // In order to tell whether a plugin gets the last mouse event and which it
6729 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6727 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6730 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6728 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6731 // |pepper_last_mouse_event_target_|. 6729 // |pepper_last_mouse_event_target_|.
6732 pepper_last_mouse_event_target_ = nullptr; 6730 pepper_last_mouse_event_target_ = nullptr;
6733 #endif 6731 #endif
6734 } 6732 }
6735 6733
6736 } // namespace content 6734 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/device_sensors/device_sensor_event_pump.h ('k') | mash/task_viewer/task_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698