OLD | NEW |
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_OVERLAY_CONFIG_H_ | 5 #ifndef MEDIA_BASE_ANDROID_OVERLAY_CONFIG_H_ |
6 #define MEDIA_BASE_ANDROID_OVERLAY_CONFIG_H_ | 6 #define MEDIA_BASE_ANDROID_OVERLAY_CONFIG_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 "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // Initial rectangle for the overlay. May be changed via ScheduleLayout(). | 36 // Initial rectangle for the overlay. May be changed via ScheduleLayout(). |
37 gfx::Rect rect; | 37 gfx::Rect rect; |
38 | 38 |
39 // Require a secure overlay? | 39 // Require a secure overlay? |
40 bool secure = false; | 40 bool secure = false; |
41 | 41 |
42 // Convenient helpers since the syntax is weird. | 42 // Convenient helpers since the syntax is weird. |
43 void is_ready(AndroidOverlay* overlay) { std::move(ready_cb).Run(overlay); } | 43 void is_ready(AndroidOverlay* overlay) { std::move(ready_cb).Run(overlay); } |
44 void is_failed(AndroidOverlay* overlay) { std::move(failed_cb).Run(overlay); } | 44 void is_failed(AndroidOverlay* overlay) { std::move(failed_cb).Run(overlay); } |
45 void is_destroyed(AndroidOverlay* overlay) { | |
46 std::move(destroyed_cb).Run(overlay); | |
47 } | |
48 | 45 |
49 ReadyCB ready_cb; | 46 ReadyCB ready_cb; |
50 FailedCB failed_cb; | 47 FailedCB failed_cb; |
51 DestroyedCB destroyed_cb; | |
52 | 48 |
53 DISALLOW_COPY(AndroidOverlayConfig); | 49 DISALLOW_COPY(AndroidOverlayConfig); |
54 }; | 50 }; |
55 | 51 |
56 // Common factory type. | 52 // Common factory type. |
57 using AndroidOverlayFactoryCB = | 53 using AndroidOverlayFactoryCB = |
58 base::RepeatingCallback<std::unique_ptr<AndroidOverlay>( | 54 base::RepeatingCallback<std::unique_ptr<AndroidOverlay>( |
59 AndroidOverlayConfig)>; | 55 AndroidOverlayConfig)>; |
60 | 56 |
61 } // namespace media | 57 } // namespace media |
62 | 58 |
63 #endif // MEDIA_BASE_ANDROID_OVERLAY_CONFIG_H_ | 59 #endif // MEDIA_BASE_ANDROID_OVERLAY_CONFIG_H_ |
OLD | NEW |