OLD | NEW |
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 <utility> |
| 8 |
7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "content/browser/frame_host/frame_tree_node.h" | 11 #include "content/browser/frame_host/frame_tree_node.h" |
10 #include "content/browser/frame_host/render_frame_host_delegate.h" | 12 #include "content/browser/frame_host/render_frame_host_delegate.h" |
11 #include "content/browser/frame_host/render_frame_host_impl.h" | 13 #include "content/browser/frame_host/render_frame_host_impl.h" |
12 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
13 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
14 #include "media/capture/video/fake_video_capture_device.h" | 16 #include "media/capture/video/fake_video_capture_device.h" |
15 | 17 |
16 namespace content { | 18 namespace content { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 base::Bind(&Core::ProcessStopRequestFromUI, base::Unretained(this))); | 125 base::Bind(&Core::ProcessStopRequestFromUI, base::Unretained(this))); |
124 } | 126 } |
125 } | 127 } |
126 | 128 |
127 void MediaStreamUIProxy::Core::ProcessAccessRequestResponse( | 129 void MediaStreamUIProxy::Core::ProcessAccessRequestResponse( |
128 const MediaStreamDevices& devices, | 130 const MediaStreamDevices& devices, |
129 content::MediaStreamRequestResult result, | 131 content::MediaStreamRequestResult result, |
130 scoped_ptr<MediaStreamUI> stream_ui) { | 132 scoped_ptr<MediaStreamUI> stream_ui) { |
131 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 133 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
132 | 134 |
133 ui_ = stream_ui.Pass(); | 135 ui_ = std::move(stream_ui); |
134 BrowserThread::PostTask( | 136 BrowserThread::PostTask( |
135 BrowserThread::IO, FROM_HERE, | 137 BrowserThread::IO, FROM_HERE, |
136 base::Bind(&MediaStreamUIProxy::ProcessAccessRequestResponse, | 138 base::Bind(&MediaStreamUIProxy::ProcessAccessRequestResponse, |
137 proxy_, devices, result)); | 139 proxy_, devices, result)); |
138 } | 140 } |
139 | 141 |
140 void MediaStreamUIProxy::Core::ProcessStopRequestFromUI() { | 142 void MediaStreamUIProxy::Core::ProcessStopRequestFromUI() { |
141 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 143 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
142 | 144 |
143 BrowserThread::PostTask( | 145 BrowserThread::PostTask( |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 callback, | 374 callback, |
373 have_access)); | 375 have_access)); |
374 return; | 376 return; |
375 } | 377 } |
376 | 378 |
377 void FakeMediaStreamUIProxy::OnStarted( | 379 void FakeMediaStreamUIProxy::OnStarted( |
378 const base::Closure& stop_callback, | 380 const base::Closure& stop_callback, |
379 const WindowIdCallback& window_id_callback) {} | 381 const WindowIdCallback& window_id_callback) {} |
380 | 382 |
381 } // namespace content | 383 } // namespace content |
OLD | NEW |