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

Side by Side Diff: media/base/android/android_overlay.h

Issue 2765443004: AndroidOverlay implementation using Dialog. (Closed)
Patch Set: make findbugs happy Created 3 years, 8 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
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_ANDROID_ANDROID_OVERLAY_H_ 5 #ifndef MEDIA_BASE_ANDROID_ANDROID_OVERLAY_H_
6 #define MEDIA_BASE_ANDROID_ANDROID_OVERLAY_H_ 6 #define MEDIA_BASE_ANDROID_ANDROID_OVERLAY_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 public: 53 public:
54 Config(); 54 Config();
55 Config(const Config&); 55 Config(const Config&);
56 ~Config(); 56 ~Config();
57 57
58 // Implementation-specific token. 58 // Implementation-specific token.
59 base::UnguessableToken routing_token; 59 base::UnguessableToken routing_token;
60 60
61 gfx::Rect rect; 61 gfx::Rect rect;
62 62
63 // Require a secure overlay?
64 bool secure = false;
65
63 ReadyCB ready_cb; 66 ReadyCB ready_cb;
64 FailedCB failed_cb; 67 FailedCB failed_cb;
65 DestroyedCB destroyed_cb; 68 DestroyedCB destroyed_cb;
66 }; 69 };
67 70
68 virtual ~AndroidOverlay() {} 71 virtual ~AndroidOverlay() {}
69 72
70 // Schedules a relayout of this overlay. If called before the client is 73 // Schedules a relayout of this overlay. If called before the client is
71 // notified that the surface is created, then the call will be ignored. 74 // notified that the surface is created, then the call will be ignored.
72 virtual void ScheduleLayout(const gfx::Rect& rect) = 0; 75 virtual void ScheduleLayout(const gfx::Rect& rect) = 0;
73 76
74 // May be called during / after ReadyCB and before DestroyedCB. 77 // May be called during / after ReadyCB and before DestroyedCB.
75 virtual const base::android::JavaRef<jobject>& GetJavaSurface() const = 0; 78 virtual const base::android::JavaRef<jobject>& GetJavaSurface() const = 0;
76 79
77 protected: 80 protected:
78 AndroidOverlay() {} 81 AndroidOverlay() {}
79 82
80 DISALLOW_COPY_AND_ASSIGN(AndroidOverlay); 83 DISALLOW_COPY_AND_ASSIGN(AndroidOverlay);
81 }; 84 };
82 85
86 // Handy callback type to provide a routing token.
87 using RoutingTokenCallback =
88 base::Callback<void(const base::UnguessableToken&)>;
89
83 } // namespace media 90 } // namespace media
84 91
85 #endif // MEDIA_BASE_ANDROID_ANDROID_OVERLAY_H_ 92 #endif // MEDIA_BASE_ANDROID_ANDROID_OVERLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698