OLD | NEW |
---|---|
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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 class WebContentsCaptureUtil { | 12 class WebContentsCaptureUtil { |
13 public: | 13 public: |
14 // Returns a new id after appending the device id scheme for virtual streams. | |
15 static std::string AppendWebContentsDeviceScheme( | |
Alpha Left Google
2012/11/28 01:04:47
These ID manipulation really feels like a hack as
justinlin
2012/11/28 14:30:31
Yup, filed http://crbug.com/163100.
We should even
| |
16 const std::string& device_id_param); | |
17 | |
18 static std::string StripWebContentsDeviceScheme( | |
19 const std::string& device_id_param); | |
20 | |
21 // Check whether the device id indicates that this is a web contents stream. | |
22 static bool IsWebContentsDeviceId(const std::string& device_id); | |
23 | |
14 // Function to extract the target renderer id's from a tab media stream | 24 // Function to extract the target renderer id's from a tab media stream |
15 // request's device id. | 25 // request's device id. |
16 static bool ExtractTabCaptureTarget(const std::string& device_id, | 26 static bool ExtractTabCaptureTarget(const std::string& device_id, |
17 int* render_process_id, | 27 int* render_process_id, |
18 int* render_view_id); | 28 int* render_view_id); |
19 }; | 29 }; |
20 | 30 |
21 } // namespace content | 31 } // namespace content |
22 | 32 |
23 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_ | 33 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_ |
OLD | NEW |