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

Side by Side Diff: net/base/mime_util.h

Issue 160073: Implemented rest of webkit api/glue code needed for HTML5 media canPlayType(). (Closed)
Patch Set: SupportsType... it's everywhere! Created 11 years, 5 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
« no previous file with comments | « no previous file | net/base/mime_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #ifndef NET_BASE_MIME_UTIL_H__ 5 #ifndef NET_BASE_MIME_UTIL_H__
6 #define NET_BASE_MIME_UTIL_H__ 6 #define NET_BASE_MIME_UTIL_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 39
40 // Convenience function. 40 // Convenience function.
41 bool IsSupportedMimeType(const std::string& mime_type); 41 bool IsSupportedMimeType(const std::string& mime_type);
42 42
43 // Returns true if this the mime_type_pattern matches a given mime-type. 43 // Returns true if this the mime_type_pattern matches a given mime-type.
44 // Checks for absolute matching and wildcards. mime-types should be in 44 // Checks for absolute matching and wildcards. mime-types should be in
45 // lower case. 45 // lower case.
46 bool MatchesMimeType(const std::string &mime_type_pattern, 46 bool MatchesMimeType(const std::string &mime_type_pattern,
47 const std::string &mime_type); 47 const std::string &mime_type);
48 48
49 // Returns true if and only if all codecs are supported, false otherwise.
50 bool AreSupportedMediaCodecs(const std::vector<std::string>& codecs);
51
49 // Parses a codec string, populating |codecs_out| with the prefix of each codec 52 // Parses a codec string, populating |codecs_out| with the prefix of each codec
50 // in the string |codecs_in|. For example, passed "aaa.b.c,dd.eee", |codecs_out| 53 // in the string |codecs_in|. For example, passed "aaa.b.c,dd.eee", |codecs_out|
51 // will contain {"aaa", "dd"}. 54 // will contain {"aaa", "dd"}.
52 // See http://www.ietf.org/rfc/rfc4281.txt. 55 // See http://www.ietf.org/rfc/rfc4281.txt.
53 void ParseCodecString(const std::string& codecs, 56 void ParseCodecString(const std::string& codecs,
54 std::vector<std::string>* codecs_out); 57 std::vector<std::string>* codecs_out);
55 58
56 } // namespace net 59 } // namespace net
57 60
58 #endif // NET_BASE_MIME_UTIL_H__ 61 #endif // NET_BASE_MIME_UTIL_H__
OLDNEW
« no previous file with comments | « no previous file | net/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698