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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <utility> | 10 #include <utility> |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 client_ = std::move(client); | 170 client_ = std::move(client); |
171 requested_frame_rate_ = params.requested_format.frame_rate; | 171 requested_frame_rate_ = params.requested_format.frame_rate; |
172 resolution_chooser_.reset(new media::CaptureResolutionChooser( | 172 resolution_chooser_.reset(new media::CaptureResolutionChooser( |
173 params.requested_format.frame_size, | 173 params.requested_format.frame_size, |
174 params.resolution_change_policy)); | 174 params.resolution_change_policy)); |
175 | 175 |
176 power_save_blocker_.reset(new device::PowerSaveBlocker( | 176 power_save_blocker_.reset(new device::PowerSaveBlocker( |
177 device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, | 177 device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, |
178 device::PowerSaveBlocker::kReasonOther, "DesktopCaptureDevice is running", | 178 device::PowerSaveBlocker::kReasonOther, "DesktopCaptureDevice is running", |
179 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 179 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
180 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); | 180 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); |
181 | 181 |
182 desktop_capturer_->Start(this); | 182 desktop_capturer_->Start(this); |
183 | 183 |
184 CaptureFrameAndScheduleNext(); | 184 CaptureFrameAndScheduleNext(); |
185 } | 185 } |
186 | 186 |
187 void DesktopCaptureDevice::Core::SetNotificationWindowId( | 187 void DesktopCaptureDevice::Core::SetNotificationWindowId( |
188 gfx::NativeViewId window_id) { | 188 gfx::NativeViewId window_id) { |
189 DCHECK(task_runner_->BelongsToCurrentThread()); | 189 DCHECK(task_runner_->BelongsToCurrentThread()); |
190 DCHECK(window_id); | 190 DCHECK(window_id); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 #else | 450 #else |
451 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; | 451 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; |
452 #endif | 452 #endif |
453 | 453 |
454 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); | 454 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); |
455 | 455 |
456 core_.reset(new Core(thread_.task_runner(), std::move(capturer), type)); | 456 core_.reset(new Core(thread_.task_runner(), std::move(capturer), type)); |
457 } | 457 } |
458 | 458 |
459 } // namespace content | 459 } // namespace content |
OLD | NEW |