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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/overlay_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_OVERLAY_INFO_H_ 5 #ifndef MEDIA_BASE_OVERLAY_INFO_H_
6 #define MEDIA_BASE_OVERLAY_INFO_H_ 6 #define MEDIA_BASE_OVERLAY_INFO_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/optional.h" 10 #include "base/optional.h"
11 #include "base/unguessable_token.h" 11 #include "base/unguessable_token.h"
12 #include "media/base/media_export.h"
13 #include "media/base/surface_manager.h"
12 14
13 namespace media { 15 namespace media {
14 16
15 // Request information to construct an overlay. This can be either a surface_id 17 struct MEDIA_EXPORT OverlayInfo {
16 // or an AndroidOverlay routing token. 18 // An unset routing token indicates "do not use any routing token". A null
17 using ProvideOverlayInfoCB = 19 // routing token isn't serializable, else we'd probably use that instead.
18 base::Callback<void(int, const base::Optional<base::UnguessableToken>&)>; 20 using RoutingToken = base::Optional<base::UnguessableToken>;
21
22 OverlayInfo();
23 OverlayInfo(const OverlayInfo&);
24
25 // Convenience functions to return true if and only if this specifies a
26 // surface ID / routing token that is not kNoSurfaceID / empty. I.e., if we
27 // provide enough info to create an overlay.
28 bool HasValidSurfaceId() const;
29 bool HasValidRoutingToken() const;
30
31 // This is the SurfaceManager surface id, or SurfaceManager::kNoSurfaceID to
32 // indicate that no surface from SurfaceManager should be used.
33 int surface_id = SurfaceManager::kNoSurfaceID;
34
35 // The routing token for AndroidOverlay, if any.
36 RoutingToken routing_token;
37
38 // Is the player in fullscreen?
39 bool is_fullscreen = false;
40 };
41
42 // Request OverlayInformation.
43 using ProvideOverlayInfoCB = base::Callback<void(const OverlayInfo&)>;
19 using RequestOverlayInfoCB = 44 using RequestOverlayInfoCB =
20 base::Callback<void(bool, const ProvideOverlayInfoCB&)>; 45 base::Callback<void(bool, const ProvideOverlayInfoCB&)>;
21 46
22 } // namespace media 47 } // namespace media
23 48
24 #endif // MEDIA_BASE_OVERLAY_INFO_H_ 49 #endif // MEDIA_BASE_OVERLAY_INFO_H_
OLDNEW
« 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