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

Side by Side Diff: content/browser/media/capture/desktop_capture_device.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/media/audio_stream_monitor.h ('k') | content/browser/power_profiler/power_profiler_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698