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

Side by Side Diff: content/browser/media/capture/web_contents_capture_util.h

Issue 364123002: [Cross-Site Isolation] Migrate entire MediaStream verticals to be per-RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: It's random enough. + REBASE Created 6 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
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 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_CAPTURE_UTIL_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_CAPTURE_UTIL_H_
6 #define CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_CAPTURE_UTIL_H_ 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_CAPTURE_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class CONTENT_EXPORT WebContentsCaptureUtil { 14 class CONTENT_EXPORT WebContentsCaptureUtil {
15 public: 15 public:
16 // Returns a new id after appending the device id scheme for virtual streams.
17 static std::string AppendWebContentsDeviceScheme(
18 const std::string& device_id_param);
19
20 static std::string StripWebContentsDeviceScheme(
21 const std::string& device_id_param);
22
23 // Check whether the device id indicates that this is a web contents stream. 16 // Check whether the device id indicates that this is a web contents stream.
24 static bool IsWebContentsDeviceId(const std::string& device_id); 17 static bool IsWebContentsDeviceId(const std::string& device_id);
25 18
26 // Function to extract the target renderer id's from a tab media stream 19 // Function to extract the target render frame id's from a media stream
27 // request's device id. 20 // request's device id.
28 static bool ExtractTabCaptureTarget(const std::string& device_id, 21 static bool ExtractTabCaptureTarget(const std::string& device_id,
29 int* render_process_id, 22 int* render_process_id,
30 int* render_view_id); 23 int* main_render_frame_id);
31 }; 24 };
32 25
33 } // namespace content 26 } // namespace content
34 27
35 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_CAPTURE_UTIL_H_ 28 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_CAPTURE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698