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

Side by Side Diff: trunk/src/content/renderer/media/android/webmediaplayer_android.cc

Issue 198163004: Revert 257524 "Move IsStringASCII/UTF8 to base namespace." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
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 "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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 } 1094 }
1095 #endif 1095 #endif
1096 1096
1097 // The following EME related code is copied from WebMediaPlayerImpl. 1097 // The following EME related code is copied from WebMediaPlayerImpl.
1098 // TODO(xhwang): Remove duplicate code between WebMediaPlayerAndroid and 1098 // TODO(xhwang): Remove duplicate code between WebMediaPlayerAndroid and
1099 // WebMediaPlayerImpl. 1099 // WebMediaPlayerImpl.
1100 1100
1101 // Convert a WebString to ASCII, falling back on an empty string in the case 1101 // Convert a WebString to ASCII, falling back on an empty string in the case
1102 // of a non-ASCII string. 1102 // of a non-ASCII string.
1103 static std::string ToASCIIOrEmpty(const blink::WebString& string) { 1103 static std::string ToASCIIOrEmpty(const blink::WebString& string) {
1104 return base::IsStringASCII(string) ? base::UTF16ToASCII(string) 1104 return IsStringASCII(string) ? base::UTF16ToASCII(string) : std::string();
1105 : std::string();
1106 } 1105 }
1107 1106
1108 // Helper functions to report media EME related stats to UMA. They follow the 1107 // Helper functions to report media EME related stats to UMA. They follow the
1109 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and 1108 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and
1110 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is 1109 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is
1111 // that UMA_* macros require the names to be constant throughout the process' 1110 // that UMA_* macros require the names to be constant throughout the process'
1112 // lifetime. 1111 // lifetime.
1113 1112
1114 static void EmeUMAHistogramEnumeration(const std::string& key_system, 1113 static void EmeUMAHistogramEnumeration(const std::string& key_system,
1115 const std::string& method, 1114 const std::string& method,
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 1443
1445 void WebMediaPlayerAndroid::exitFullscreen() { 1444 void WebMediaPlayerAndroid::exitFullscreen() {
1446 manager_->ExitFullscreen(player_id_); 1445 manager_->ExitFullscreen(player_id_);
1447 } 1446 }
1448 1447
1449 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1448 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1450 return manager_->CanEnterFullscreen(frame_); 1449 return manager_->CanEnterFullscreen(frame_);
1451 } 1450 }
1452 1451
1453 } // namespace content 1452 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698