OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/media/capture/desktop_capture_device.h" | 5 #include "content/browser/media/capture/desktop_capture_device.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 // Determines the size of frames to deliver to the |client_|. | 102 // Determines the size of frames to deliver to the |client_|. |
103 scoped_ptr<media::CaptureResolutionChooser> resolution_chooser_; | 103 scoped_ptr<media::CaptureResolutionChooser> resolution_chooser_; |
104 | 104 |
105 // DesktopFrame into which captured frames are down-scaled and/or letterboxed, | 105 // DesktopFrame into which captured frames are down-scaled and/or letterboxed, |
106 // depending upon the caller's requested capture capabilities. If frames can | 106 // depending upon the caller's requested capture capabilities. If frames can |
107 // be returned to the caller directly then this is NULL. | 107 // be returned to the caller directly then this is NULL. |
108 scoped_ptr<webrtc::DesktopFrame> output_frame_; | 108 scoped_ptr<webrtc::DesktopFrame> output_frame_; |
109 | 109 |
110 // Timer used to capture the frame. | 110 // Timer used to capture the frame. |
111 base::OneShotTimer<Core> capture_timer_; | 111 base::OneShotTimer capture_timer_; |
112 | 112 |
113 // True when waiting for |desktop_capturer_| to capture current frame. | 113 // True when waiting for |desktop_capturer_| to capture current frame. |
114 bool capture_in_progress_; | 114 bool capture_in_progress_; |
115 | 115 |
116 // True if the first capture call has returned. Used to log the first capture | 116 // True if the first capture call has returned. Used to log the first capture |
117 // result. | 117 // result. |
118 bool first_capture_returned_; | 118 bool first_capture_returned_; |
119 | 119 |
120 // The type of the capturer. | 120 // The type of the capturer. |
121 DesktopMediaID::Type capturer_type_; | 121 DesktopMediaID::Type capturer_type_; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 #else | 451 #else |
452 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; | 452 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; |
453 #endif | 453 #endif |
454 | 454 |
455 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); | 455 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); |
456 | 456 |
457 core_.reset(new Core(thread_.task_runner(), capturer.Pass(), type)); | 457 core_.reset(new Core(thread_.task_runner(), capturer.Pass(), type)); |
458 } | 458 } |
459 | 459 |
460 } // namespace content | 460 } // namespace content |
OLD | NEW |