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

Side by Side Diff: media/capture/device_monitor_mac.h

Issue 2081653004: Revert of Re-Reland: Make media/capture gn and gyps produce components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « media/capture/content/video_capture_oracle.h ('k') | media/capture/device_monitor_udev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef MEDIA_CAPTURE_DEVICE_MONITOR_MAC_H_ 5 #ifndef MEDIA_CAPTURE_DEVICE_MONITOR_MAC_H_
6 #define MEDIA_CAPTURE_DEVICE_MONITOR_MAC_H_ 6 #define MEDIA_CAPTURE_DEVICE_MONITOR_MAC_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/system_monitor/system_monitor.h" 11 #include "base/system_monitor/system_monitor.h"
12 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
13 #include "media/capture/capture_export.h" 13 #include "media/base/media_export.h"
14 14
15 namespace { 15 namespace {
16 class DeviceMonitorMacImpl; 16 class DeviceMonitorMacImpl;
17 } 17 }
18 18
19 namespace media { 19 namespace media {
20 20
21 // Class to track audio/video devices removal or addition via callback to 21 // Class to track audio/video devices removal or addition via callback to
22 // base::SystemMonitor ProcessDevicesChanged(). A single object of this class 22 // base::SystemMonitor ProcessDevicesChanged(). A single object of this class
23 // is created from the browser main process and lives as long as this one. 23 // is created from the browser main process and lives as long as this one.
24 class CAPTURE_EXPORT DeviceMonitorMac { 24 class MEDIA_EXPORT DeviceMonitorMac {
25 public: 25 public:
26 DeviceMonitorMac(); 26 DeviceMonitorMac();
27 ~DeviceMonitorMac(); 27 ~DeviceMonitorMac();
28 28
29 // Registers the observers for the audio/video device removal, connection and 29 // Registers the observers for the audio/video device removal, connection and
30 // suspension. The AVFoundation library is also loaded and initialised if the 30 // suspension. The AVFoundation library is also loaded and initialised if the
31 // OS supports it. The |device_task_runner| argument represents the thread on 31 // OS supports it. The |device_task_runner| argument represents the thread on
32 // which device enumeration will occur. 32 // which device enumeration will occur.
33 void StartMonitoring( 33 void StartMonitoring(
34 const scoped_refptr<base::SingleThreadTaskRunner>& device_task_runner); 34 const scoped_refptr<base::SingleThreadTaskRunner>& device_task_runner);
35 35
36 // Method called by the internal DeviceMonitorMacImpl object 36 // Method called by the internal DeviceMonitorMacImpl object
37 // |device_monitor_impl_| when a device of type |type| has been added to or 37 // |device_monitor_impl_| when a device of type |type| has been added to or
38 // removed from the system. This code executes in the notification thread. 38 // removed from the system. This code executes in the notification thread.
39 void NotifyDeviceChanged(base::SystemMonitor::DeviceType type); 39 void NotifyDeviceChanged(base::SystemMonitor::DeviceType type);
40 40
41 private: 41 private:
42 std::unique_ptr<DeviceMonitorMacImpl> device_monitor_impl_; 42 std::unique_ptr<DeviceMonitorMacImpl> device_monitor_impl_;
43 43
44 // |thread_checker_| is used to check that constructor and StartMonitoring() 44 // |thread_checker_| is used to check that constructor and StartMonitoring()
45 // are called in the correct thread, the UI thread, that also owns the object. 45 // are called in the correct thread, the UI thread, that also owns the object.
46 base::ThreadChecker thread_checker_; 46 base::ThreadChecker thread_checker_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(DeviceMonitorMac); 48 DISALLOW_COPY_AND_ASSIGN(DeviceMonitorMac);
49 }; 49 };
50 50
51 } // namespace content 51 } // namespace content
52 52
53 #endif // MEDIA_CAPTURE_DEVICE_MONITOR_MAC_H_ 53 #endif // MEDIA_CAPTURE_DEVICE_MONITOR_MAC_H_
OLDNEW
« no previous file with comments | « media/capture/content/video_capture_oracle.h ('k') | media/capture/device_monitor_udev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698