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

Side by Side Diff: media/mojo/clients/mojo_android_overlay.h

Issue 2688193002: Mojo framework for AndroidOverlay. (Closed)
Patch Set: fixed mojo manifest bug introduced by rebase Created 3 years, 9 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/mojo/clients/BUILD.gn ('k') | media/mojo/clients/mojo_android_overlay.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_BASE_MOJO_ANDROID_OVERLAY_H_
6 #define MEDIA_BASE_MOJO_ANDROID_OVERLAY_H_
7
8 #include "base/macros.h"
9 #include "media/base/android/android_overlay.h"
10 #include "media/mojo/interfaces/android_overlay.mojom.h"
11 #include "mojo/public/cpp/bindings/binding.h"
12
13 namespace service_manager {
14 namespace mojom {
15 class InterfaceProvider;
16 }
17 }
18
19 namespace media {
20
21 // AndroidOverlay implementation via mojo.
22 class MojoAndroidOverlay : public AndroidOverlay,
23 public mojom::AndroidOverlayClient {
24 public:
25 MojoAndroidOverlay(
26 service_manager::mojom::InterfaceProvider* interface_provider,
27 const AndroidOverlay::Config& config);
28
29 ~MojoAndroidOverlay() override;
30
31 // AndroidOverlay
32 void ScheduleLayout(const gfx::Rect& rect) override;
33 const base::android::JavaRef<jobject>& GetJavaSurface() const override;
34
35 // mojom::AndroidOverlayClient
36 void OnSurfaceReady(uint64_t surface_key) override;
37 void OnDestroyed() override;
38
39 private:
40 service_manager::mojom::InterfaceProvider* interface_provider_;
41 AndroidOverlay::Config config_;
42 mojom::AndroidOverlayProviderPtr provider_ptr_;
43 mojom::AndroidOverlayPtr overlay_ptr_;
44 std::unique_ptr<mojo::Binding<mojom::AndroidOverlayClient>> binding_;
45 gl::ScopedJavaSurface surface_;
46
47 // Have we received OnSurfaceReady yet?
48 bool received_surface_ = false;
49
50 DISALLOW_COPY_AND_ASSIGN(MojoAndroidOverlay);
51 };
52
53 } // namespace media
54
55 #endif // MEDIA_BASE_MOJO_ANDROID_OVERLAY_H_
OLDNEW
« no previous file with comments | « media/mojo/clients/BUILD.gn ('k') | media/mojo/clients/mojo_android_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698