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

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

Issue 7314022: Adding possibility to bypass MediaStream UI to be able to rununit tests on server. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_stream_device_settings.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 10 // This version always accepts the first device in the list(s), but this will
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 int render_process_id, 51 int render_process_id,
52 int render_view_id, 52 int render_view_id,
53 const StreamOptions& stream_components, 53 const StreamOptions& stream_components,
54 const std::string& security_origin); 54 const std::string& security_origin);
55 55
56 // Called as response to SettingsRequester::GetDevices. One response for each 56 // Called as response to SettingsRequester::GetDevices. One response for each
57 // call to |GetDevices| is expected. 57 // call to |GetDevices| is expected.
58 void AvailableDevices(const std::string& label, MediaStreamType stream_type, 58 void AvailableDevices(const std::string& label, MediaStreamType stream_type,
59 const StreamDeviceInfoArray& devices); 59 const StreamDeviceInfoArray& devices);
60 60
61 // Used for testing only. This function is called to use faked UI, which is
62 // needed for server based tests. The first non-opened device(s) will be
63 // picked.
64 void UseFakeUI();
65
61 private: 66 private:
62 struct SettingsRequest; 67 struct SettingsRequest;
63 68
64 SettingsRequester* requester_; 69 SettingsRequester* requester_;
65 70
66 typedef std::map<std::string, SettingsRequest*> SettingsRequests; 71 typedef std::map<std::string, SettingsRequest*> SettingsRequests;
67 SettingsRequests requests_; 72 SettingsRequests requests_;
68 73
74 bool use_fake_ui_;
75
69 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); 76 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings);
70 }; 77 };
71 78
72 } // namespace media_stream 79 } // namespace media_stream
73 80
74 #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/media_stream_device_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698