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

Side by Side Diff: media/base/android_overlay_config.h

Issue 2883913003: Add multiple destruction callbacks to AndroidOverlay. (Closed)
Patch Set: rebased.... though i got not conflicts? Created 3 years, 7 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_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
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_
OLDNEW
« no previous file with comments | « media/base/android/mock_android_overlay.cc ('k') | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698