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

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

Issue 1640123004: Propagate media session id into MediaPlayerAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-media-session-id-over-ipc
Patch Set: Add TODO for remote playback interaction Created 4 years, 9 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 25 matching lines...) Expand all
36 void DoNothing(int /*i*/) {} 36 void DoNothing(int /*i*/) {}
37 } 37 }
38 38
39 namespace remote_media { 39 namespace remote_media {
40 40
41 RemoteMediaPlayerBridge::RemoteMediaPlayerBridge( 41 RemoteMediaPlayerBridge::RemoteMediaPlayerBridge(
42 int player_id, 42 int player_id,
43 const std::string& user_agent, 43 const std::string& user_agent,
44 bool hide_url_log, 44 bool hide_url_log,
45 RemoteMediaPlayerManager* manager) 45 RemoteMediaPlayerManager* manager)
46 : MediaPlayerAndroid(player_id, 46 : MediaPlayerAndroid(
47 manager, 47 player_id,
48 base::Bind(&DoNothing), 48 manager,
49 manager->GetLocalPlayer(player_id)->frame_url()), 49 base::Bind(&DoNothing),
50 manager->GetLocalPlayer(player_id)->frame_url(),
51 // TODO(davve): Media session interaction with remote
52 // playback not defined. Use default session for now.
53 // https://github.com/whatwg/mediasession/issues/123
54 media::kDefaultMediaSessionID),
whywhat 2016/03/10 22:34:56 What does using the default session mean in practi
davve 2016/03/11 13:20:29 Ok, kInvalidMediaSessionId it is.
50 width_(0), 55 width_(0),
51 height_(0), 56 height_(0),
52 hide_url_log_(hide_url_log), 57 hide_url_log_(hide_url_log),
53 url_(manager->GetLocalPlayer(player_id)->GetUrl()), 58 url_(manager->GetLocalPlayer(player_id)->GetUrl()),
54 first_party_for_cookies_( 59 first_party_for_cookies_(
55 manager->GetLocalPlayer(player_id)->GetFirstPartyForCookies()), 60 manager->GetLocalPlayer(player_id)->GetFirstPartyForCookies()),
56 user_agent_(user_agent), 61 user_agent_(user_agent),
57 weak_factory_(this) { 62 weak_factory_(this) {
58 DCHECK_CURRENTLY_ON(BrowserThread::UI); 63 DCHECK_CURRENTLY_ON(BrowserThread::UI);
59 JNIEnv* env = base::android::AttachCurrentThread(); 64 JNIEnv* env = base::android::AttachCurrentThread();
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 Java_RemoteMediaPlayerBridge_setCookies( 474 Java_RemoteMediaPlayerBridge_setCookies(
470 env, java_bridge_.obj(), ConvertUTF8ToJavaString(env, cookies).obj()); 475 env, java_bridge_.obj(), ConvertUTF8ToJavaString(env, cookies).obj());
471 } 476 }
472 477
473 MediaPlayerAndroid* RemoteMediaPlayerBridge::GetLocalPlayer() { 478 MediaPlayerAndroid* RemoteMediaPlayerBridge::GetLocalPlayer() {
474 return static_cast<RemoteMediaPlayerManager*>(manager())->GetLocalPlayer( 479 return static_cast<RemoteMediaPlayerManager*>(manager())->GetLocalPlayer(
475 player_id()); 480 player_id());
476 } 481 }
477 482
478 } // namespace remote_media 483 } // namespace remote_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698