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

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

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 7 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 new CacheStorageDispatcher(thread_safe_sender())); 644 new CacheStorageDispatcher(thread_safe_sender()));
645 645
646 // Note: This may reorder messages from the ResourceDispatcher with respect to 646 // Note: This may reorder messages from the ResourceDispatcher with respect to
647 // other subsystems. 647 // other subsystems.
648 resource_dispatch_throttler_.reset(new ResourceDispatchThrottler( 648 resource_dispatch_throttler_.reset(new ResourceDispatchThrottler(
649 static_cast<RenderThread*>(this), renderer_scheduler_.get(), 649 static_cast<RenderThread*>(this), renderer_scheduler_.get(),
650 base::TimeDelta::FromSecondsD(kThrottledResourceRequestFlushPeriodS), 650 base::TimeDelta::FromSecondsD(kThrottledResourceRequestFlushPeriodS),
651 kMaxResourceRequestsPerFlushWhenThrottled)); 651 kMaxResourceRequestsPerFlushWhenThrottled));
652 resource_dispatcher()->set_message_sender(resource_dispatch_throttler_.get()); 652 resource_dispatcher()->set_message_sender(resource_dispatch_throttler_.get());
653 653
654 media_stream_center_ = nullptr;
655
656 blob_message_filter_ = new BlobMessageFilter(GetFileThreadTaskRunner()); 654 blob_message_filter_ = new BlobMessageFilter(GetFileThreadTaskRunner());
657 AddFilter(blob_message_filter_.get()); 655 AddFilter(blob_message_filter_.get());
658 db_message_filter_ = new DBMessageFilter(); 656 db_message_filter_ = new DBMessageFilter();
659 AddFilter(db_message_filter_.get()); 657 AddFilter(db_message_filter_.get());
660 658
661 vc_manager_.reset(new VideoCaptureImplManager()); 659 vc_manager_.reset(new VideoCaptureImplManager());
662 660
663 browser_plugin_manager_.reset(new BrowserPluginManager()); 661 browser_plugin_manager_.reset(new BrowserPluginManager());
664 AddObserver(browser_plugin_manager_.get()); 662 AddObserver(browser_plugin_manager_.get());
665 663
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 } 1971 }
1974 1972
1975 std::unique_ptr<cc::SwapPromise> 1973 std::unique_ptr<cc::SwapPromise>
1976 RenderThreadImpl::RequestCopyOfOutputForLayoutTest( 1974 RenderThreadImpl::RequestCopyOfOutputForLayoutTest(
1977 int32_t routing_id, 1975 int32_t routing_id,
1978 std::unique_ptr<cc::CopyOutputRequest> request) { 1976 std::unique_ptr<cc::CopyOutputRequest> request) {
1979 DCHECK(layout_test_deps_); 1977 DCHECK(layout_test_deps_);
1980 return layout_test_deps_->RequestCopyOfOutput(routing_id, std::move(request)); 1978 return layout_test_deps_->RequestCopyOfOutput(routing_id, std::move(request));
1981 } 1979 }
1982 1980
1983 blink::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( 1981 std::unique_ptr<blink::WebMediaStreamCenter>
1982 RenderThreadImpl::CreateMediaStreamCenter(
1984 blink::WebMediaStreamCenterClient* client) { 1983 blink::WebMediaStreamCenterClient* client) {
1984 std::unique_ptr<blink::WebMediaStreamCenter> media_stream_center;
1985 #if BUILDFLAG(ENABLE_WEBRTC) 1985 #if BUILDFLAG(ENABLE_WEBRTC)
1986 if (!media_stream_center_) { 1986 if (!media_stream_center) {
1987 media_stream_center_ = GetContentClient()->renderer() 1987 media_stream_center =
1988 ->OverrideCreateWebMediaStreamCenter(client); 1988 GetContentClient()->renderer()->OverrideCreateWebMediaStreamCenter(
1989 if (!media_stream_center_) { 1989 client);
1990 std::unique_ptr<MediaStreamCenter> media_stream_center( 1990 if (!media_stream_center) {
1991 new MediaStreamCenter(client, GetPeerConnectionDependencyFactory())); 1991 media_stream_center = base::MakeUnique<MediaStreamCenter>(
1992 media_stream_center_ = media_stream_center.release(); 1992 client, GetPeerConnectionDependencyFactory());
1993 } 1993 }
1994 } 1994 }
1995 #endif 1995 #endif
1996 return media_stream_center_; 1996 return media_stream_center;
1997 } 1997 }
1998 1998
1999 #if BUILDFLAG(ENABLE_WEBRTC) 1999 #if BUILDFLAG(ENABLE_WEBRTC)
2000 PeerConnectionDependencyFactory* 2000 PeerConnectionDependencyFactory*
2001 RenderThreadImpl::GetPeerConnectionDependencyFactory() { 2001 RenderThreadImpl::GetPeerConnectionDependencyFactory() {
2002 return peer_connection_factory_.get(); 2002 return peer_connection_factory_.get();
2003 } 2003 }
2004 #endif 2004 #endif
2005 2005
2006 mojom::RenderFrameMessageFilter* 2006 mojom::RenderFrameMessageFilter*
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 } 2412 }
2413 } 2413 }
2414 2414
2415 void RenderThreadImpl::OnRendererInterfaceRequest( 2415 void RenderThreadImpl::OnRendererInterfaceRequest(
2416 mojom::RendererAssociatedRequest request) { 2416 mojom::RendererAssociatedRequest request) {
2417 DCHECK(!renderer_binding_.is_bound()); 2417 DCHECK(!renderer_binding_.is_bound());
2418 renderer_binding_.Bind(std::move(request)); 2418 renderer_binding_.Bind(std::move(request));
2419 } 2419 }
2420 2420
2421 } // namespace content 2421 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698