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

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

Issue 2338223003: Unassociating MediaSession from media players (in blink & content) (Closed)
Patch Set: fixed tests Created 4 years, 3 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
« no previous file with comments | « no previous file | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30 matching lines...) Expand all
41 namespace remote_media { 41 namespace remote_media {
42 42
43 RemoteMediaPlayerBridge::RemoteMediaPlayerBridge( 43 RemoteMediaPlayerBridge::RemoteMediaPlayerBridge(
44 int player_id, 44 int player_id,
45 const std::string& user_agent, 45 const std::string& user_agent,
46 RemoteMediaPlayerManager* manager) 46 RemoteMediaPlayerManager* manager)
47 : MediaPlayerAndroid( 47 : MediaPlayerAndroid(
48 player_id, 48 player_id,
49 manager, 49 manager,
50 base::Bind(&DoNothing), 50 base::Bind(&DoNothing),
51 manager->GetLocalPlayer(player_id)->frame_url(), 51 manager->GetLocalPlayer(player_id)->frame_url()),
52 // TODO(davve): Media session interaction with remote
53 // playback not defined. Use invalid session id for now.
54 // https://github.com/whatwg/mediasession/issues/123
55 media::kInvalidMediaSessionId),
56 width_(0), 52 width_(0),
57 height_(0), 53 height_(0),
58 url_(manager->GetLocalPlayer(player_id)->GetUrl()), 54 url_(manager->GetLocalPlayer(player_id)->GetUrl()),
59 first_party_for_cookies_( 55 first_party_for_cookies_(
60 manager->GetLocalPlayer(player_id)->GetFirstPartyForCookies()), 56 manager->GetLocalPlayer(player_id)->GetFirstPartyForCookies()),
61 user_agent_(user_agent), 57 user_agent_(user_agent),
62 weak_factory_(this) { 58 weak_factory_(this) {
63 DCHECK_CURRENTLY_ON(BrowserThread::UI); 59 DCHECK_CURRENTLY_ON(BrowserThread::UI);
64 JNIEnv* env = base::android::AttachCurrentThread(); 60 JNIEnv* env = base::android::AttachCurrentThread();
65 CHECK(env); 61 CHECK(env);
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 Java_RemoteMediaPlayerBridge_setCookies( 472 Java_RemoteMediaPlayerBridge_setCookies(
477 env, java_bridge_, ConvertUTF8ToJavaString(env, cookies)); 473 env, java_bridge_, ConvertUTF8ToJavaString(env, cookies));
478 } 474 }
479 475
480 MediaPlayerAndroid* RemoteMediaPlayerBridge::GetLocalPlayer() { 476 MediaPlayerAndroid* RemoteMediaPlayerBridge::GetLocalPlayer() {
481 return static_cast<RemoteMediaPlayerManager*>(manager())->GetLocalPlayer( 477 return static_cast<RemoteMediaPlayerManager*>(manager())->GetLocalPlayer(
482 player_id()); 478 player_id());
483 } 479 }
484 480
485 } // namespace remote_media 481 } // namespace remote_media
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698