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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 // Implementation of VideoCaptureDevice methods. | 58 // Implementation of VideoCaptureDevice methods. |
59 void AllocateAndStart(const media::VideoCaptureParams& params, | 59 void AllocateAndStart(const media::VideoCaptureParams& params, |
60 scoped_ptr<Client> client); | 60 scoped_ptr<Client> client); |
61 | 61 |
62 void SetNotificationWindowId(gfx::NativeViewId window_id); | 62 void SetNotificationWindowId(gfx::NativeViewId window_id); |
63 | 63 |
64 private: | 64 private: |
65 | 65 |
66 // webrtc::DesktopCapturer::Callback interface | 66 // webrtc::DesktopCapturer::Callback interface |
67 virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE; | 67 virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) override; |
68 virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) OVERRIDE; | 68 virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; |
69 | 69 |
70 // Chooses new output properties based on the supplied source size and the | 70 // Chooses new output properties based on the supplied source size and the |
71 // properties requested to Allocate(), and dispatches OnFrameInfo[Changed] | 71 // properties requested to Allocate(), and dispatches OnFrameInfo[Changed] |
72 // notifications. | 72 // notifications. |
73 void RefreshCaptureFormat(const webrtc::DesktopSize& frame_size); | 73 void RefreshCaptureFormat(const webrtc::DesktopSize& frame_size); |
74 | 74 |
75 // Method that is scheduled on |task_runner_| to be called on regular interval | 75 // Method that is scheduled on |task_runner_| to be called on regular interval |
76 // to capture a frame. | 76 // to capture a frame. |
77 void OnCaptureTimer(); | 77 void OnCaptureTimer(); |
78 | 78 |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 #else | 478 #else |
479 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; | 479 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; |
480 #endif | 480 #endif |
481 | 481 |
482 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); | 482 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); |
483 | 483 |
484 core_.reset(new Core(thread_.message_loop_proxy(), capturer.Pass(), type)); | 484 core_.reset(new Core(thread_.message_loop_proxy(), capturer.Pass(), type)); |
485 } | 485 } |
486 | 486 |
487 } // namespace content | 487 } // namespace content |
OLD | NEW |