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

Side by Side Diff: content/public/browser/desktop_media_id.h

Issue 1644073002: Desktop Share Audio User Permission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor Style Change Created 4 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_
6 #define CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_ 6 #define CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_
7 7
8 #include <string> 8 #include <string>
9 #include <tuple> 9 #include <tuple>
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 DesktopMediaID() = default; 42 DesktopMediaID() = default;
43 43
44 DesktopMediaID(Type type, Id id) : type(type), id(id) {} 44 DesktopMediaID(Type type, Id id) : type(type), id(id) {}
45 45
46 DesktopMediaID(Type type, Id id, WebContentsMediaCaptureId web_contents_id) 46 DesktopMediaID(Type type, Id id, WebContentsMediaCaptureId web_contents_id)
47 : type(type), id(id), web_contents_id(web_contents_id) {} 47 : type(type), id(id), web_contents_id(web_contents_id) {}
48 48
49 // Operators so that DesktopMediaID can be used with STL containers. 49 // Operators so that DesktopMediaID can be used with STL containers.
50 bool operator<(const DesktopMediaID& other) const; 50 bool operator<(const DesktopMediaID& other) const;
51 bool operator==(const DesktopMediaID& other) const; 51 bool operator==(const DesktopMediaID& other) const;
Sergey Ulanov 2016/03/29 18:32:12 I think you also need to update implementation of
52 52
53 bool is_null() const { return type == TYPE_NONE; } 53 bool is_null() const { return type == TYPE_NONE; }
54 std::string ToString() const; 54 std::string ToString() const;
55 static DesktopMediaID Parse(const std::string& str); 55 static DesktopMediaID Parse(const std::string& str);
56 56
57 Type type = TYPE_NONE; 57 Type type = TYPE_NONE;
58 58
59 // The IDs referring to the target native screen or window. |id| will be 59 // The IDs referring to the target native screen or window. |id| will be
60 // non-null if and only if it refers to a native screen/window. |aura_id| 60 // non-null if and only if it refers to a native screen/window. |aura_id|
61 // will be non-null if and only if it refers to an Aura window. Note that is 61 // will be non-null if and only if it refers to an Aura window. Note that is
62 // it possible for both of these to be non-null, which means both IDs are 62 // it possible for both of these to be non-null, which means both IDs are
63 // referring to the same logical window. 63 // referring to the same logical window.
64 Id id = kNullId; 64 Id id = kNullId;
65 #if defined(USE_AURA) 65 #if defined(USE_AURA)
66 // TODO(miu): Make this an int, after clean-up for http://crbug.com/513490. 66 // TODO(miu): Make this an int, after clean-up for http://crbug.com/513490.
67 Id aura_id = kNullId; 67 Id aura_id = kNullId;
68 #endif 68 #endif
69 69
70 // This records whether the desktop share has sound or not.
71 bool audio_share = false;
72
70 // This id contains information for WebContents capture. 73 // This id contains information for WebContents capture.
71 WebContentsMediaCaptureId web_contents_id; 74 WebContentsMediaCaptureId web_contents_id;
72 }; 75 };
73 76
74 } // namespace content 77 } // namespace content
75 78
76 #endif // CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_ 79 #endif // CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/examples/api/desktopCapture/app.js ('k') | extensions/common/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698