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

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

Issue 100743003: Extend content::DesktopMediaID to allow Aura windows as capture sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « content/public/browser/desktop_media_id.cc ('k') | content/public/common/desktop_media_id.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_
6 #define CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_util.h"
13 #include "content/common/content_export.h"
14
15 namespace content {
16
17 // Type used to identify desktop media sources. It's converted to string and
18 // stored in MediaStreamRequest::requested_video_device_id .
19 struct CONTENT_EXPORT DesktopMediaID {
20 public:
21 enum Type {
22 TYPE_NONE,
23 TYPE_SCREEN,
24 TYPE_WINDOW,
25 };
26 typedef intptr_t Id;
27
28 static DesktopMediaID Parse(const std::string& str);
29
30 DesktopMediaID()
31 : type(TYPE_NONE),
32 id(0) {
33 }
34 DesktopMediaID(Type type, Id id)
35 : type(type),
36 id(id) {
37 }
38
39 // Operators so that DesktopMediaID can be used with STL containers.
40 bool operator<(const DesktopMediaID& other) const {
41 return type < other.type || (type == other.type && id < other.id);
42 }
43 bool operator==(const DesktopMediaID& other) const {
44 return type == other.type && id == other.id;
45 }
46
47 bool is_null() { return type == TYPE_NONE; }
48
49 std::string ToString();
50
51 Type type;
52 Id id;
53 };
54
55 } // namespace content
56
57 #endif // CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_
OLDNEW
« no previous file with comments | « content/public/browser/desktop_media_id.cc ('k') | content/public/common/desktop_media_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698