OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/media/capture/content_video_capture_device_core.h" | 5 #include "content/browser/media/capture/content_video_capture_device_core.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "media/base/video_frame_metadata.h" | 28 #include "media/base/video_frame_metadata.h" |
29 #include "media/base/video_util.h" | 29 #include "media/base/video_util.h" |
30 #include "ui/gfx/geometry/rect.h" | 30 #include "ui/gfx/geometry/rect.h" |
31 | 31 |
32 namespace content { | 32 namespace content { |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 void DeleteCaptureMachineOnUIThread( | 36 void DeleteCaptureMachineOnUIThread( |
37 scoped_ptr<VideoCaptureMachine> capture_machine) { | 37 scoped_ptr<VideoCaptureMachine> capture_machine) { |
38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 38 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
39 | 39 |
40 capture_machine.reset(); | 40 capture_machine.reset(); |
41 } | 41 } |
42 | 42 |
43 } // namespace | 43 } // namespace |
44 | 44 |
45 ThreadSafeCaptureOracle::ThreadSafeCaptureOracle( | 45 ThreadSafeCaptureOracle::ThreadSafeCaptureOracle( |
46 scoped_ptr<media::VideoCaptureDevice::Client> client, | 46 scoped_ptr<media::VideoCaptureDevice::Client> client, |
47 const media::VideoCaptureParams& params) | 47 const media::VideoCaptureParams& params) |
48 : client_(client.Pass()), | 48 : client_(client.Pass()), |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 return; | 341 return; |
342 | 342 |
343 if (oracle_proxy_.get()) | 343 if (oracle_proxy_.get()) |
344 oracle_proxy_->ReportError(reason); | 344 oracle_proxy_->ReportError(reason); |
345 | 345 |
346 StopAndDeAllocate(); | 346 StopAndDeAllocate(); |
347 TransitionStateTo(kError); | 347 TransitionStateTo(kError); |
348 } | 348 } |
349 | 349 |
350 } // namespace content | 350 } // namespace content |
OLD | NEW |