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

Side by Side Diff: content/browser/renderer_host/media/media_stream_ui_proxy.cc

Issue 491103004: Support scoped_ptr in BrowserThread::DeleteOnThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thu Aug 21 03:07:17 PDT 2014 Created 6 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 | Annotate | Revision Log
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/browser/renderer_host/media/media_stream_ui_proxy.h" 5 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/frame_host/render_frame_host_delegate.h" 8 #include "content/browser/frame_host/render_frame_host_delegate.h"
9 #include "content/browser/frame_host/render_frame_host_impl.h" 9 #include "content/browser/frame_host/render_frame_host_impl.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 MediaStreamUIProxy::MediaStreamUIProxy( 122 MediaStreamUIProxy::MediaStreamUIProxy(
123 RenderFrameHostDelegate* test_render_delegate) 123 RenderFrameHostDelegate* test_render_delegate)
124 : weak_factory_(this) { 124 : weak_factory_(this) {
125 DCHECK_CURRENTLY_ON(BrowserThread::IO); 125 DCHECK_CURRENTLY_ON(BrowserThread::IO);
126 core_.reset(new Core(weak_factory_.GetWeakPtr(), test_render_delegate)); 126 core_.reset(new Core(weak_factory_.GetWeakPtr(), test_render_delegate));
127 } 127 }
128 128
129 MediaStreamUIProxy::~MediaStreamUIProxy() { 129 MediaStreamUIProxy::~MediaStreamUIProxy() {
130 DCHECK_CURRENTLY_ON(BrowserThread::IO); 130 DCHECK_CURRENTLY_ON(BrowserThread::IO);
131 BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, core_.release());
132 } 131 }
133 132
134 void MediaStreamUIProxy::RequestAccess( 133 void MediaStreamUIProxy::RequestAccess(
135 const MediaStreamRequest& request, 134 const MediaStreamRequest& request,
136 const ResponseCallback& response_callback) { 135 const ResponseCallback& response_callback) {
137 DCHECK_CURRENTLY_ON(BrowserThread::IO); 136 DCHECK_CURRENTLY_ON(BrowserThread::IO);
138 137
139 response_callback_ = response_callback; 138 response_callback_ = response_callback;
140 BrowserThread::PostTask( 139 BrowserThread::PostTask(
141 BrowserThread::UI, FROM_HERE, 140 BrowserThread::UI, FROM_HERE,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 devices_to_use.empty() ? 256 devices_to_use.empty() ?
258 MEDIA_DEVICE_NO_HARDWARE : 257 MEDIA_DEVICE_NO_HARDWARE :
259 MEDIA_DEVICE_OK)); 258 MEDIA_DEVICE_OK));
260 } 259 }
261 260
262 void FakeMediaStreamUIProxy::OnStarted( 261 void FakeMediaStreamUIProxy::OnStarted(
263 const base::Closure& stop_callback, 262 const base::Closure& stop_callback,
264 const WindowIdCallback& window_id_callback) {} 263 const WindowIdCallback& window_id_callback) {}
265 264
266 } // namespace content 265 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_ui_proxy.h ('k') | content/public/browser/browser_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698