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_ |