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

Unified Diff: content/public/browser/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_common.gypi ('k') | content/public/browser/desktop_media_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/desktop_media_id.h
diff --git a/content/public/common/desktop_media_id.h b/content/public/browser/desktop_media_id.h
similarity index 64%
rename from content/public/common/desktop_media_id.h
rename to content/public/browser/desktop_media_id.h
index a863872eb12981c90b47d8d8b878723ca194fd6d..639a3c8d43054299e098fa289fdf7a4e8d9bc2ab 100644
--- a/content/public/common/desktop_media_id.h
+++ b/content/public/browser/desktop_media_id.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_
-#define CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_
+#ifndef CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_
+#define CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_
#include <string>
@@ -12,6 +12,10 @@
#include "base/strings/string_util.h"
#include "content/common/content_export.h"
+namespace aura {
+class Window;
+} // namespace aura
+
namespace content {
// Type used to identify desktop media sources. It's converted to string and
@@ -22,9 +26,20 @@ struct CONTENT_EXPORT DesktopMediaID {
TYPE_NONE,
TYPE_SCREEN,
TYPE_WINDOW,
+ TYPE_AURA_WINDOW,
};
typedef intptr_t Id;
+#if defined(USE_AURA)
+ // Assigns integer identifier to the |window| and returns DesktopMediaID of
+ // type TYPE_AURA_WINDOW that corresponds to that |window|.
+ static DesktopMediaID RegisterAuraWindow(aura::Window* window);
+
+ // For DesktopMediaID of type TYPE_AURA_WINDOW returns the |window| that was
+ // previously registered using RegisterAuraWindow().
+ static aura::Window* GetAuraWindowById(const DesktopMediaID& id);
+#endif // defined(USE_AURA)
+
static DesktopMediaID Parse(const std::string& str);
DesktopMediaID()
@@ -54,4 +69,4 @@ struct CONTENT_EXPORT DesktopMediaID {
} // namespace content
-#endif // CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_
+#endif // CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_
« no previous file with comments | « content/content_common.gypi ('k') | content/public/browser/desktop_media_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698