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

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

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 result.x(), result.y(), result.right(), result.bottom()); 46 result.x(), result.y(), result.right(), result.bottom());
47 } 47 }
48 48
49 } // namespace 49 } // namespace
50 50
51 class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback { 51 class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback {
52 public: 52 public:
53 Core(scoped_refptr<base::SingleThreadTaskRunner> task_runner, 53 Core(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
54 scoped_ptr<webrtc::DesktopCapturer> capturer, 54 scoped_ptr<webrtc::DesktopCapturer> capturer,
55 DesktopMediaID::Type type); 55 DesktopMediaID::Type type);
56 virtual ~Core(); 56 ~Core() override;
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 webrtc::SharedMemory* CreateSharedMemory(size_t size) override;
68 virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; 68 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698