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

Unified Diff: media/base/overlay_info.h

Issue 2892083002: Send enter / exit fullscreen signal to AVDA (Closed)
Patch Set: rebased. Created 3 years, 6 months 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 | « media/base/BUILD.gn ('k') | media/base/overlay_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/overlay_info.h
diff --git a/media/base/overlay_info.h b/media/base/overlay_info.h
index da0c387dcbcfcc65e3c96ea27cbb733fbeca478c..089edcac63cc06f28d9ceff65d52020f840a345a 100644
--- a/media/base/overlay_info.h
+++ b/media/base/overlay_info.h
@@ -9,13 +9,38 @@
#include "base/macros.h"
#include "base/optional.h"
#include "base/unguessable_token.h"
+#include "media/base/media_export.h"
+#include "media/base/surface_manager.h"
namespace media {
-// Request information to construct an overlay. This can be either a surface_id
-// or an AndroidOverlay routing token.
-using ProvideOverlayInfoCB =
- base::Callback<void(int, const base::Optional<base::UnguessableToken>&)>;
+struct MEDIA_EXPORT OverlayInfo {
+ // An unset routing token indicates "do not use any routing token". A null
+ // routing token isn't serializable, else we'd probably use that instead.
+ using RoutingToken = base::Optional<base::UnguessableToken>;
+
+ OverlayInfo();
+ OverlayInfo(const OverlayInfo&);
+
+ // Convenience functions to return true if and only if this specifies a
+ // surface ID / routing token that is not kNoSurfaceID / empty. I.e., if we
+ // provide enough info to create an overlay.
+ bool HasValidSurfaceId() const;
+ bool HasValidRoutingToken() const;
+
+ // This is the SurfaceManager surface id, or SurfaceManager::kNoSurfaceID to
+ // indicate that no surface from SurfaceManager should be used.
+ int surface_id = SurfaceManager::kNoSurfaceID;
+
+ // The routing token for AndroidOverlay, if any.
+ RoutingToken routing_token;
+
+ // Is the player in fullscreen?
+ bool is_fullscreen = false;
+};
+
+// Request OverlayInformation.
+using ProvideOverlayInfoCB = base::Callback<void(const OverlayInfo&)>;
using RequestOverlayInfoCB =
base::Callback<void(bool, const ProvideOverlayInfoCB&)>;
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/overlay_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698