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

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

Issue 196793010: Move IsStringASCII/UTF8 to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 IsStringASCII(string) ? base::UTF16ToASCII(string) : std::string(); 1104 return base::IsStringASCII(string) ? base::UTF16ToASCII(string)
1105 : std::string();
1105 } 1106 }
1106 1107
1107 // Helper functions to report media EME related stats to UMA. They follow the 1108 // Helper functions to report media EME related stats to UMA. They follow the
1108 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and 1109 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and
1109 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is 1110 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is
1110 // that UMA_* macros require the names to be constant throughout the process' 1111 // that UMA_* macros require the names to be constant throughout the process'
1111 // lifetime. 1112 // lifetime.
1112 1113
1113 static void EmeUMAHistogramEnumeration(const std::string& key_system, 1114 static void EmeUMAHistogramEnumeration(const std::string& key_system,
1114 const std::string& method, 1115 const std::string& method,
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 1444
1444 void WebMediaPlayerAndroid::exitFullscreen() { 1445 void WebMediaPlayerAndroid::exitFullscreen() {
1445 manager_->ExitFullscreen(player_id_); 1446 manager_->ExitFullscreen(player_id_);
1446 } 1447 }
1447 1448
1448 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1449 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1449 return manager_->CanEnterFullscreen(frame_); 1450 return manager_->CanEnterFullscreen(frame_);
1450 } 1451 }
1451 1452
1452 } // namespace content 1453 } // namespace content
OLDNEW
« no previous file with comments | « content/child/simple_webmimeregistry_impl.cc ('k') | content/renderer/media/webcontentdecryptionmodule_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698