OLD | NEW |
---|---|
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 Loading... | |
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, |
davve
2016/02/25 09:57:32
Is this reformat ok? Made by git cl format.
whywhat
2016/02/29 16:26:29
Yes. Might cause merge problems but is not a big d
| |
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 manager->GetLocalPlayer(player_id)->media_session_id()), | |
mlamouri (slow - plz ping)
2016/02/25 14:13:54
What does that mean for a remote player to have th
philipj_slow
2016/02/29 09:50:37
Looks like a problem brewing here, in the interact
whywhat
2016/02/29 16:26:29
AFAIK, the remote player won't use the media sessi
davve
2016/03/01 05:42:22
Right now there is no defined invalid id, but we c
philipj_slow
2016/03/03 11:10:52
OK, so if remote playback can be modeled as one or
| |
50 width_(0), | 52 width_(0), |
51 height_(0), | 53 height_(0), |
52 hide_url_log_(hide_url_log), | 54 hide_url_log_(hide_url_log), |
53 url_(manager->GetLocalPlayer(player_id)->GetUrl()), | 55 url_(manager->GetLocalPlayer(player_id)->GetUrl()), |
54 first_party_for_cookies_( | 56 first_party_for_cookies_( |
55 manager->GetLocalPlayer(player_id)->GetFirstPartyForCookies()), | 57 manager->GetLocalPlayer(player_id)->GetFirstPartyForCookies()), |
56 user_agent_(user_agent), | 58 user_agent_(user_agent), |
57 weak_factory_(this) { | 59 weak_factory_(this) { |
58 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 60 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
59 JNIEnv* env = base::android::AttachCurrentThread(); | 61 JNIEnv* env = base::android::AttachCurrentThread(); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
469 Java_RemoteMediaPlayerBridge_setCookies( | 471 Java_RemoteMediaPlayerBridge_setCookies( |
470 env, java_bridge_.obj(), ConvertUTF8ToJavaString(env, cookies).obj()); | 472 env, java_bridge_.obj(), ConvertUTF8ToJavaString(env, cookies).obj()); |
471 } | 473 } |
472 | 474 |
473 MediaPlayerAndroid* RemoteMediaPlayerBridge::GetLocalPlayer() { | 475 MediaPlayerAndroid* RemoteMediaPlayerBridge::GetLocalPlayer() { |
474 return static_cast<RemoteMediaPlayerManager*>(manager())->GetLocalPlayer( | 476 return static_cast<RemoteMediaPlayerManager*>(manager())->GetLocalPlayer( |
475 player_id()); | 477 player_id()); |
476 } | 478 } |
477 | 479 |
478 } // namespace remote_media | 480 } // namespace remote_media |
OLD | NEW |