OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/android/content_video_view.h" | 5 #include "content/browser/android/content_video_view.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/browser/android/media_player_manager_android.h" | 10 #include "content/browser/android/media_player_manager_android.h" |
11 #include "content/common/android/surface_callback.h" | |
12 #include "content/common/android/surface_texture_peer.h" | 11 #include "content/common/android/surface_texture_peer.h" |
13 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
14 #include "jni/ContentVideoView_jni.h" | 13 #include "jni/ContentVideoView_jni.h" |
15 | 14 |
16 using base::android::AttachCurrentThread; | 15 using base::android::AttachCurrentThread; |
17 using base::android::CheckException; | 16 using base::android::CheckException; |
18 using base::android::ScopedJavaGlobalRef; | 17 using base::android::ScopedJavaGlobalRef; |
19 | 18 |
20 namespace content { | 19 namespace content { |
21 | 20 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void ContentVideoView::UpdateMediaMetadata(JNIEnv* env, jobject obj) { | 137 void ContentVideoView::UpdateMediaMetadata(JNIEnv* env, jobject obj) { |
139 media::MediaPlayerBridge* player = manager_->GetFullscreenPlayer(); | 138 media::MediaPlayerBridge* player = manager_->GetFullscreenPlayer(); |
140 if (player && player->prepared()) | 139 if (player && player->prepared()) |
141 Java_ContentVideoView_updateMediaMetadata( | 140 Java_ContentVideoView_updateMediaMetadata( |
142 env, obj, player->GetVideoWidth(), player->GetVideoHeight(), | 141 env, obj, player->GetVideoWidth(), player->GetVideoHeight(), |
143 player->GetDuration().InMilliseconds(), player->can_pause(), | 142 player->GetDuration().InMilliseconds(), player->can_pause(), |
144 player->can_seek_forward(), player->can_seek_backward()); | 143 player->can_seek_forward(), player->can_seek_backward()); |
145 } | 144 } |
146 | 145 |
147 } // namespace content | 146 } // namespace content |
OLD | NEW |