| 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 "media/base/android/media_player_bridge.h" | 5 #include "media/base/android/media_player_bridge.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // is available. | 28 // is available. |
| 29 static const int kTemporaryDuration = 100; | 29 static const int kTemporaryDuration = 100; |
| 30 | 30 |
| 31 namespace media { | 31 namespace media { |
| 32 | 32 |
| 33 #if !defined(GOOGLE_TV) | 33 #if !defined(GOOGLE_TV) |
| 34 // static | 34 // static |
| 35 MediaPlayerAndroid* MediaPlayerAndroid::Create( | 35 MediaPlayerAndroid* MediaPlayerAndroid::Create( |
| 36 int player_id, | 36 int player_id, |
| 37 const GURL& url, | 37 const GURL& url, |
| 38 bool is_media_source, | 38 SourceType source_type, |
| 39 const GURL& first_party_for_cookies, | 39 const GURL& first_party_for_cookies, |
| 40 bool hide_url_log, | 40 bool hide_url_log, |
| 41 MediaPlayerManager* manager) { | 41 MediaPlayerManager* manager) { |
| 42 if (!is_media_source) { | 42 if (source_type == SOURCE_TYPE_URL) { |
| 43 MediaPlayerBridge* media_player_bridge = new MediaPlayerBridge( | 43 MediaPlayerBridge* media_player_bridge = new MediaPlayerBridge( |
| 44 player_id, | 44 player_id, |
| 45 url, | 45 url, |
| 46 first_party_for_cookies, | 46 first_party_for_cookies, |
| 47 hide_url_log, | 47 hide_url_log, |
| 48 manager); | 48 manager); |
| 49 media_player_bridge->Initialize(); | 49 media_player_bridge->Initialize(); |
| 50 return media_player_bridge; | 50 return media_player_bridge; |
| 51 } else { | 51 } else { |
| 52 return new MediaSourcePlayer( | 52 return new MediaSourcePlayer( |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 419 |
| 420 GURL MediaPlayerBridge::GetUrl() { | 420 GURL MediaPlayerBridge::GetUrl() { |
| 421 return url_; | 421 return url_; |
| 422 } | 422 } |
| 423 | 423 |
| 424 GURL MediaPlayerBridge::GetFirstPartyForCookies() { | 424 GURL MediaPlayerBridge::GetFirstPartyForCookies() { |
| 425 return first_party_for_cookies_; | 425 return first_party_for_cookies_; |
| 426 } | 426 } |
| 427 | 427 |
| 428 } // namespace media | 428 } // namespace media |
| OLD | NEW |