| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 static aura::Window* GetAuraWindowById(const DesktopMediaID& id); | 39 static aura::Window* GetAuraWindowById(const DesktopMediaID& id); |
| 40 #endif // defined(USE_AURA) | 40 #endif // defined(USE_AURA) |
| 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 DesktopMediaID(Type type, Id id, bool audio_share) |
| 50 : type(type), id(id), audio_share(audio_share) {} |
| 51 |
| 49 // Operators so that DesktopMediaID can be used with STL containers. | 52 // Operators so that DesktopMediaID can be used with STL containers. |
| 50 bool operator<(const DesktopMediaID& other) const; | 53 bool operator<(const DesktopMediaID& other) const; |
| 51 bool operator==(const DesktopMediaID& other) const; | 54 bool operator==(const DesktopMediaID& other) const; |
| 52 | 55 |
| 53 bool is_null() const { return type == TYPE_NONE; } | 56 bool is_null() const { return type == TYPE_NONE; } |
| 54 std::string ToString() const; | 57 std::string ToString() const; |
| 55 static DesktopMediaID Parse(const std::string& str); | 58 static DesktopMediaID Parse(const std::string& str); |
| 56 | 59 |
| 57 Type type = TYPE_NONE; | 60 Type type = TYPE_NONE; |
| 58 | 61 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 70 // This records whether the desktop share has sound or not. | 73 // This records whether the desktop share has sound or not. |
| 71 bool audio_share = false; | 74 bool audio_share = false; |
| 72 | 75 |
| 73 // This id contains information for WebContents capture. | 76 // This id contains information for WebContents capture. |
| 74 WebContentsMediaCaptureId web_contents_id; | 77 WebContentsMediaCaptureId web_contents_id; |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 } // namespace content | 80 } // namespace content |
| 78 | 81 |
| 79 #endif // CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_ | 82 #endif // CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_ |
| OLD | NEW |