| 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_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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // Configuration used to create an overlay. | 50 // Configuration used to create an overlay. |
| 51 struct Config { | 51 struct Config { |
| 52 public: | 52 public: |
| 53 Config(); | 53 Config(); |
| 54 Config(const Config&); | 54 Config(const Config&); |
| 55 ~Config(); | 55 ~Config(); |
| 56 | 56 |
| 57 gfx::Rect rect; | 57 gfx::Rect rect; |
| 58 | 58 |
| 59 // Require a secure overlay? |
| 60 bool secure = false; |
| 61 |
| 59 ReadyCB ready_cb; | 62 ReadyCB ready_cb; |
| 60 FailedCB failed_cb; | 63 FailedCB failed_cb; |
| 61 DestroyedCB destroyed_cb; | 64 DestroyedCB destroyed_cb; |
| 62 }; | 65 }; |
| 63 | 66 |
| 64 virtual ~AndroidOverlay() {} | 67 virtual ~AndroidOverlay() {} |
| 65 | 68 |
| 66 // Schedules a relayout of this overlay. If called before the client is | 69 // Schedules a relayout of this overlay. If called before the client is |
| 67 // notified that the surface is created, then the call will be ignored. | 70 // notified that the surface is created, then the call will be ignored. |
| 68 virtual void ScheduleLayout(const gfx::Rect& rect) = 0; | 71 virtual void ScheduleLayout(const gfx::Rect& rect) = 0; |
| 69 | 72 |
| 70 // May be called during / after ReadyCB and before DestroyedCB. | 73 // May be called during / after ReadyCB and before DestroyedCB. |
| 71 virtual const base::android::JavaRef<jobject>& GetJavaSurface() const = 0; | 74 virtual const base::android::JavaRef<jobject>& GetJavaSurface() const = 0; |
| 72 | 75 |
| 73 protected: | 76 protected: |
| 74 AndroidOverlay() {} | 77 AndroidOverlay() {} |
| 75 | 78 |
| 76 DISALLOW_COPY_AND_ASSIGN(AndroidOverlay); | 79 DISALLOW_COPY_AND_ASSIGN(AndroidOverlay); |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 } // namespace media | 82 } // namespace media |
| 80 | 83 |
| 81 #endif // MEDIA_BASE_ANDROID_ANDROID_OVERLAY_H_ | 84 #endif // MEDIA_BASE_ANDROID_ANDROID_OVERLAY_H_ |
| OLD | NEW |