Save errno for logging before potentially overwriting it.
[chromium-blink-merge.git] / content / browser / renderer_host / media / web_contents_capture_util.h
blob8f376afdeec1734c207424e572a7ad7b4584c713
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_
8 #include <string>
10 #include "content/common/content_export.h"
12 namespace content {
14 class CONTENT_EXPORT WebContentsCaptureUtil {
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);
20 static std::string StripWebContentsDeviceScheme(
21 const std::string& device_id_param);
23 // Check whether the device id indicates that this is a web contents stream.
24 static bool IsWebContentsDeviceId(const std::string& device_id);
26 // Function to extract the target renderer id's from a tab media stream
27 // request's device id.
28 static bool ExtractTabCaptureTarget(const std::string& device_id,
29 int* render_process_id,
30 int* render_view_id);
33 } // namespace content
35 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_CAPTURE_UTIL_H_