| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MEDIA_DEVICES_SELECTION_HANDLE
R_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MEDIA_DEVICES_SELECTION_HANDLE
R_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MEDIA_DEVICES_SELECTION_HANDLE
R_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MEDIA_DEVICES_SELECTION_HANDLE
R_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
| 10 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 10 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Sets the default audio/video capture device for media. |args| includes the | 44 // Sets the default audio/video capture device for media. |args| includes the |
| 45 // media type (kAuudio/kVideo) and the unique id of the new default device | 45 // media type (kAuudio/kVideo) and the unique id of the new default device |
| 46 // that the user has chosen. | 46 // that the user has chosen. |
| 47 void SetDefaultCaptureDevice(const base::ListValue* args); | 47 void SetDefaultCaptureDevice(const base::ListValue* args); |
| 48 | 48 |
| 49 // Helpers methods to update the device menus. | 49 // Helpers methods to update the device menus. |
| 50 void UpdateDevicesMenuForType(DeviceType type); | 50 void UpdateDevicesMenuForType(DeviceType type); |
| 51 void UpdateDevicesMenu(DeviceType type, | 51 void UpdateDevicesMenu(DeviceType type, |
| 52 const content::MediaStreamDevices& devices); | 52 const content::MediaStreamDevices& devices); |
| 53 | 53 |
| 54 // Gets the human readable name of the device. |
| 55 std::string GetDeviceDisplayName( |
| 56 const content::MediaStreamDevice& device) const; |
| 57 |
| 54 Profile* profile_; // Weak pointer. | 58 Profile* profile_; // Weak pointer. |
| 55 | 59 |
| 56 ScopedObserver<MediaCaptureDevicesDispatcher, | 60 ScopedObserver<MediaCaptureDevicesDispatcher, |
| 57 MediaCaptureDevicesDispatcher::Observer> observer_; | 61 MediaCaptureDevicesDispatcher::Observer> observer_; |
| 58 | 62 |
| 59 DISALLOW_COPY_AND_ASSIGN(MediaDevicesSelectionHandler); | 63 DISALLOW_COPY_AND_ASSIGN(MediaDevicesSelectionHandler); |
| 60 }; | 64 }; |
| 61 | 65 |
| 62 } // namespace settings | 66 } // namespace settings |
| 63 | 67 |
| 64 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MEDIA_DEVICES_SELECTION_HAN
DLER_H_ | 68 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MEDIA_DEVICES_SELECTION_HAN
DLER_H_ |
| OLD | NEW |