| 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( |
| 16 const std::string& device_id_param); |
| 17 |
| 18 // Check whether the device id indicates that this is a web contents stream. |
| 19 static bool IsWebContentsDeviceId(const std::string& device_id); |
| 20 |
| 14 // Function to extract the target renderer id's from a tab media stream | 21 // Function to extract the target renderer id's from a tab media stream |
| 15 // request's device id. | 22 // request's device id. |
| 16 static bool ExtractTabCaptureTarget(const std::string& device_id, | 23 static bool ExtractTabCaptureTarget(const std::string& device_id, |
| 17 int& render_process_id, | 24 int& render_process_id, |
| 18 int& render_view_id); | 25 int& render_view_id); |
| 19 }; | 26 }; |
| 20 | 27 |
| 21 } // namespace content | 28 } // namespace content |
| 22 | 29 |
| 23 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_ | 30 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_ |
| OLD | NEW |