| 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 "content/renderer/media/android/webmediaplayer_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_android.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 } | 1184 } |
| 1185 #endif | 1185 #endif |
| 1186 | 1186 |
| 1187 // The following EME related code is copied from WebMediaPlayerImpl. | 1187 // The following EME related code is copied from WebMediaPlayerImpl. |
| 1188 // TODO(xhwang): Remove duplicate code between WebMediaPlayerAndroid and | 1188 // TODO(xhwang): Remove duplicate code between WebMediaPlayerAndroid and |
| 1189 // WebMediaPlayerImpl. | 1189 // WebMediaPlayerImpl. |
| 1190 | 1190 |
| 1191 // Convert a WebString to ASCII, falling back on an empty string in the case | 1191 // Convert a WebString to ASCII, falling back on an empty string in the case |
| 1192 // of a non-ASCII string. | 1192 // of a non-ASCII string. |
| 1193 static std::string ToASCIIOrEmpty(const blink::WebString& string) { | 1193 static std::string ToASCIIOrEmpty(const blink::WebString& string) { |
| 1194 return IsStringASCII(string) ? base::UTF16ToASCII(string) : std::string(); | 1194 return base::IsStringASCII(string) ? base::UTF16ToASCII(string) |
| 1195 : std::string(); |
| 1195 } | 1196 } |
| 1196 | 1197 |
| 1197 // Helper functions to report media EME related stats to UMA. They follow the | 1198 // Helper functions to report media EME related stats to UMA. They follow the |
| 1198 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and | 1199 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and |
| 1199 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is | 1200 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is |
| 1200 // that UMA_* macros require the names to be constant throughout the process' | 1201 // that UMA_* macros require the names to be constant throughout the process' |
| 1201 // lifetime. | 1202 // lifetime. |
| 1202 | 1203 |
| 1203 static void EmeUMAHistogramEnumeration(const std::string& key_system, | 1204 static void EmeUMAHistogramEnumeration(const std::string& key_system, |
| 1204 const std::string& method, | 1205 const std::string& method, |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 | 1553 |
| 1553 void WebMediaPlayerAndroid::exitFullscreen() { | 1554 void WebMediaPlayerAndroid::exitFullscreen() { |
| 1554 manager_->ExitFullscreen(player_id_); | 1555 manager_->ExitFullscreen(player_id_); |
| 1555 } | 1556 } |
| 1556 | 1557 |
| 1557 bool WebMediaPlayerAndroid::canEnterFullscreen() const { | 1558 bool WebMediaPlayerAndroid::canEnterFullscreen() const { |
| 1558 return manager_->CanEnterFullscreen(frame_); | 1559 return manager_->CanEnterFullscreen(frame_); |
| 1559 } | 1560 } |
| 1560 | 1561 |
| 1561 } // namespace content | 1562 } // namespace content |
| OLD | NEW |