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

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
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 66%
rename from content/public/common/desktop_media_id.h
rename to content/public/browser/desktop_media_id.h
index a863872eb12981c90b47d8d8b878723ca194fd6d..11c1f8ae2252cc333ddc8fd0654d14bca14a66b4 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,18 @@ struct CONTENT_EXPORT DesktopMediaID {
TYPE_NONE,
TYPE_SCREEN,
TYPE_WINDOW,
+ TYPE_AURA_WINDOW,
};
typedef intptr_t Id;
+ // 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);
+
static DesktopMediaID Parse(const std::string& str);
DesktopMediaID()
@@ -54,4 +67,4 @@ struct CONTENT_EXPORT DesktopMediaID {
} // namespace content
-#endif // CONTENT_PUBLIC_COMMON_DESKTOP_MEDIA_ID_H_
+#endif // CONTENT_PUBLIC_BROWSER_DESKTOP_MEDIA_ID_H_

Powered by Google App Engine
This is Rietveld 408576698