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" | 11 #include "content/common/android/surface_callback.h" |
12 #include "content/common/android/surface_texture_peer.h" | 12 #include "content/common/android/surface_texture_peer.h" |
13 #include "content/public/browser/browser_thread.h" | |
14 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
15 #include "jni/ContentVideoView_jni.h" | 14 #include "jni/ContentVideoView_jni.h" |
16 | 15 |
17 using base::android::AttachCurrentThread; | 16 using base::android::AttachCurrentThread; |
18 using base::android::CheckException; | 17 using base::android::CheckException; |
19 using base::android::ScopedJavaGlobalRef; | 18 using base::android::ScopedJavaGlobalRef; |
20 | 19 |
21 namespace content { | 20 namespace content { |
22 | 21 |
23 bool ContentVideoView::RegisterContentVideoView(JNIEnv* env) { | 22 bool ContentVideoView::RegisterContentVideoView(JNIEnv* env) { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 137 |
139 void ContentVideoView::UpdateMediaMetadata(JNIEnv* env, jobject obj) { | 138 void ContentVideoView::UpdateMediaMetadata(JNIEnv* env, jobject obj) { |
140 media::MediaPlayerBridge* player = manager_->GetFullscreenPlayer(); | 139 media::MediaPlayerBridge* player = manager_->GetFullscreenPlayer(); |
141 if (player && player->prepared()) | 140 if (player && player->prepared()) |
142 Java_ContentVideoView_updateMediaMetadata( | 141 Java_ContentVideoView_updateMediaMetadata( |
143 env, obj, player->GetVideoWidth(), player->GetVideoHeight(), | 142 env, obj, player->GetVideoWidth(), player->GetVideoHeight(), |
144 player->GetDuration().InMilliseconds(), player->can_pause(), | 143 player->GetDuration().InMilliseconds(), player->can_pause(), |
145 player->can_seek_forward(), player->can_seek_backward()); | 144 player->can_seek_forward(), player->can_seek_backward()); |
146 } | 145 } |
147 | 146 |
148 } // namespace content | 147 } // namespace content |
OLD | NEW |