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

Side by Side Diff: chrome/browser/media/android/remote/remote_media_player_bridge.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/media/android/remote/remote_media_player_bridge.h" 5 #include "chrome/browser/media/android/remote/remote_media_player_bridge.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // reasons, such as freeing resources, etc. and during those times, the 202 // reasons, such as freeing resources, etc. and during those times, the
203 // remote video playback should not be paused. 203 // remote video playback should not be paused.
204 if (is_media_related_action) { 204 if (is_media_related_action) {
205 DCHECK_CURRENTLY_ON(BrowserThread::UI); 205 DCHECK_CURRENTLY_ON(BrowserThread::UI);
206 JNIEnv* env = AttachCurrentThread(); 206 JNIEnv* env = AttachCurrentThread();
207 Java_RemoteMediaPlayerBridge_pause(env, java_bridge_.obj()); 207 Java_RemoteMediaPlayerBridge_pause(env, java_bridge_.obj());
208 time_update_timer_.Stop(); 208 time_update_timer_.Stop();
209 } 209 }
210 } 210 }
211 211
212 void RemoteMediaPlayerBridge::SetVideoSurface(gfx::ScopedJavaSurface surface) { 212 void RemoteMediaPlayerBridge::SetVideoSurface(gl::ScopedJavaSurface surface) {
213 // The surface is reset whenever the fullscreen view is destroyed or created. 213 // The surface is reset whenever the fullscreen view is destroyed or created.
214 // Since the remote player doesn't use it, we forward it to the local player 214 // Since the remote player doesn't use it, we forward it to the local player
215 // for the time when user disconnects and resumes local playback 215 // for the time when user disconnects and resumes local playback
216 // (see crbug.com/420690). 216 // (see crbug.com/420690).
217 MediaPlayerAndroid* local_player = GetLocalPlayer(); 217 MediaPlayerAndroid* local_player = GetLocalPlayer();
218 if (!local_player) 218 if (!local_player)
219 return; 219 return;
220 local_player->SetVideoSurface(std::move(surface)); 220 local_player->SetVideoSurface(std::move(surface));
221 } 221 }
222 222
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 Java_RemoteMediaPlayerBridge_setCookies( 482 Java_RemoteMediaPlayerBridge_setCookies(
483 env, java_bridge_.obj(), ConvertUTF8ToJavaString(env, cookies).obj()); 483 env, java_bridge_.obj(), ConvertUTF8ToJavaString(env, cookies).obj());
484 } 484 }
485 485
486 MediaPlayerAndroid* RemoteMediaPlayerBridge::GetLocalPlayer() { 486 MediaPlayerAndroid* RemoteMediaPlayerBridge::GetLocalPlayer() {
487 return static_cast<RemoteMediaPlayerManager*>(manager())->GetLocalPlayer( 487 return static_cast<RemoteMediaPlayerManager*>(manager())->GetLocalPlayer(
488 player_id()); 488 player_id());
489 } 489 }
490 490
491 } // namespace remote_media 491 } // namespace remote_media
OLDNEW
« no previous file with comments | « chrome/browser/media/android/remote/remote_media_player_bridge.h ('k') | chrome/test/base/chrome_unit_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698