OLD | NEW |
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 #include "chromecast/browser/android/external_video_surface_container_impl.h" | 5 #include "chromecast/browser/android/external_video_surface_container_impl.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "content/public/browser/android/content_view_core.h" | 8 #include "content/public/browser/android/content_view_core.h" |
9 #include "jni/ExternalVideoSurfaceContainer_jni.h" | 9 #include "jni/ExternalVideoSurfaceContainer_jni.h" |
10 #include "ui/gfx/rect_f.h" | 10 #include "ui/gfx/geometry/rect_f.h" |
11 | 11 |
12 namespace chromecast { | 12 namespace chromecast { |
13 namespace shell { | 13 namespace shell { |
14 | 14 |
15 ExternalVideoSurfaceContainerImpl::ExternalVideoSurfaceContainerImpl( | 15 ExternalVideoSurfaceContainerImpl::ExternalVideoSurfaceContainerImpl( |
16 content::WebContents* web_contents) { | 16 content::WebContents* web_contents) { |
17 content::ContentViewCore* cvc = | 17 content::ContentViewCore* cvc = |
18 content::ContentViewCore::FromWebContents(web_contents); | 18 content::ContentViewCore::FromWebContents(web_contents); |
19 if (cvc) { | 19 if (cvc) { |
20 JNIEnv* env = base::android::AttachCurrentThread(); | 20 JNIEnv* env = base::android::AttachCurrentThread(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 if (!surface_destroyed_cb_.is_null()) | 82 if (!surface_destroyed_cb_.is_null()) |
83 surface_destroyed_cb_.Run(static_cast<int>(player_id)); | 83 surface_destroyed_cb_.Run(static_cast<int>(player_id)); |
84 } | 84 } |
85 | 85 |
86 bool RegisterExternalVideoSurfaceContainer(JNIEnv* env) { | 86 bool RegisterExternalVideoSurfaceContainer(JNIEnv* env) { |
87 return RegisterNativesImpl(env); | 87 return RegisterNativesImpl(env); |
88 } | 88 } |
89 | 89 |
90 } // namespace shell | 90 } // namespace shell |
91 } // namespace chromecast | 91 } // namespace chromecast |
OLD | NEW |