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

Side by Side Diff: android_webview/native/external_video_surface_container_impl.h

Issue 231933006: Move ExternalVideoSurfaceHolder from WebContents UserData to BrowserMediaPlayerManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ANDROID_WEBVIEW_NATIVE_EXTERNAL_VIDEO_SURFACE_CONTAINER_IMPL_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_EXTERNAL_VIDEO_SURFACE_CONTAINER_IMPL_H_
6 #define ANDROID_WEBVIEW_NATIVE_EXTERNAL_VIDEO_SURFACE_CONTAINER_IMPL_H_ 6 #define ANDROID_WEBVIEW_NATIVE_EXTERNAL_VIDEO_SURFACE_CONTAINER_IMPL_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "content/public/browser/android/external_video_surface_container.h" 13 #include "content/public/browser/android/external_video_surface_container.h"
14 #include "content/public/browser/web_contents_user_data.h"
15 14
16 namespace android_webview { 15 namespace android_webview {
17 16
18 class ExternalVideoSurfaceContainerImpl 17 class ExternalVideoSurfaceContainerImpl
19 : public content::ExternalVideoSurfaceContainer, 18 : public content::ExternalVideoSurfaceContainer {
20 public content::WebContentsUserData<ExternalVideoSurfaceContainerImpl> {
21 public: 19 public:
22 typedef base::Callback<void(int, jobject)> SurfaceCreatedCB; 20 typedef base::Callback<void(int, jobject)> SurfaceCreatedCB;
23 typedef base::Callback<void(int)> SurfaceDestroyedCB; 21 typedef base::Callback<void(int)> SurfaceDestroyedCB;
24 22
25 ExternalVideoSurfaceContainerImpl(content::WebContents* contents); 23 ExternalVideoSurfaceContainerImpl(content::WebContents* contents);
26 24
27 // ExternalVideoSurfaceContainer implementation. 25 // ExternalVideoSurfaceContainer implementation.
28 virtual void RequestExternalVideoSurface( 26 virtual void RequestExternalVideoSurface(
29 int player_id, 27 int player_id,
30 const SurfaceCreatedCB& surface_created_cb, 28 const SurfaceCreatedCB& surface_created_cb,
(...skipping 17 matching lines...) Expand all
48 SurfaceDestroyedCB surface_destroyed_cb_; 46 SurfaceDestroyedCB surface_destroyed_cb_;
49 47
50 DISALLOW_COPY_AND_ASSIGN(ExternalVideoSurfaceContainerImpl); 48 DISALLOW_COPY_AND_ASSIGN(ExternalVideoSurfaceContainerImpl);
51 }; 49 };
52 50
53 bool RegisterExternalVideoSurfaceContainer(JNIEnv* env); 51 bool RegisterExternalVideoSurfaceContainer(JNIEnv* env);
54 52
55 } // namespace android_webview 53 } // namespace android_webview
56 54
57 #endif // ANDROID_WEBVIEW_NATIVE_EXTERNAL_VIDEO_SURFACE_CONTAINER_IMPL_H_ 55 #endif // ANDROID_WEBVIEW_NATIVE_EXTERNAL_VIDEO_SURFACE_CONTAINER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698