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

Side by Side Diff: content/browser/renderer_host/media/media_stream_device_settings.h

Issue 10035054: Merge VideoCaptureDevice::Capability with media::VideoCaptureCapability (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix a namespace issue Created 8 years, 7 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 | « no previous file | content/browser/renderer_host/media/video_capture_controller.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 // MediaStreamDeviceSettings is used to decide which of the available capture 5 // MediaStreamDeviceSettings is used to decide which of the available capture
6 // device to use as well as getting user permission to use the capture device. 6 // device to use as well as getting user permission to use the capture device.
7 // There will be one instance of MediaStreamDeviceSettings handling all 7 // There will be one instance of MediaStreamDeviceSettings handling all
8 // requests. 8 // requests.
9 9
10 // This version always accepts the first device in the list(s), but this will
11 // soon be changed to ask the user and/or Chrome settings.
12
13 // Expected call flow: 10 // Expected call flow:
14 // 1. RequestCaptureDeviceUsage() to request usage of capture device. 11 // 1. RequestCaptureDeviceUsage() is called to create a new request for capture
15 // 2. SettingsRequester::GetDevices() is called to get a list of available 12 // device usage.
16 // devices. 13 // 2. AvailableDevices() is called with a list of currently available devices.
17 // 3. AvailableDevices() is called with a list of currently available devices. 14 // 3. Pick device and get user confirmation.
18 // 4. TODO(mflodman) Pick device and get user confirmation. 15 // 4. Confirm by calling SettingsRequester::DevicesAccepted().
19 // Temporary 4. Choose first device of each requested media type. 16 // Repeat step 1 - 4 for new device requests.
20 // 5. Confirm by calling SettingsRequester::DevicesAccepted().
21 // Repeat step 1 - 5 for new device requests.
22
23 // Note that this is still in a development phase and the class will be modified
24 // to include real UI interaction.
25 17
26 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ 18 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_
27 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ 19 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_
28 20
29 #include <map> 21 #include <map>
30 #include <string> 22 #include <string>
31 23
32 #include "base/basictypes.h" 24 #include "base/basictypes.h"
33 #include "base/memory/weak_ptr.h" 25 #include "base/memory/weak_ptr.h"
34 #include "content/browser/renderer_host/media/media_stream_provider.h" 26 #include "content/browser/renderer_host/media/media_stream_provider.h"
(...skipping 30 matching lines...) Expand all
65 // This method must be called on the IO thread. 57 // This method must be called on the IO thread.
66 void PostResponse(const std::string& label, 58 void PostResponse(const std::string& label,
67 const content::MediaStreamDevices& devices); 59 const content::MediaStreamDevices& devices);
68 60
69 // Used for testing only. This function is called to use faked UI, which is 61 // Used for testing only. This function is called to use faked UI, which is
70 // needed for server based tests. The first non-opened device(s) will be 62 // needed for server based tests. The first non-opened device(s) will be
71 // picked. 63 // picked.
72 void UseFakeUI(); 64 void UseFakeUI();
73 65
74 private: 66 private:
75 typedef std::map< std::string, MediaStreamDeviceSettingsRequest* > 67 typedef std::map<std::string, MediaStreamDeviceSettingsRequest*>
76 SettingsRequests; 68 SettingsRequests;
77 69
78 SettingsRequester* requester_; 70 SettingsRequester* requester_;
79 SettingsRequests requests_; 71 SettingsRequests requests_;
80 72
81 // See comment above for method UseFakeUI. Used for automated testing. 73 // See comment above for method UseFakeUI. Used for automated testing.
82 bool use_fake_ui_; 74 bool use_fake_ui_;
83 75
84 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); 76 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings);
85 }; 77 };
86 78
87 } // namespace media_stream 79 } // namespace media_stream
88 80
89 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ 81 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698