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

Side by Side Diff: webkit/support/test_shell_webmimeregistry_impl.h

Issue 17447011: Shuffle media-related WebMimeRegistry code from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot some diffs Created 7 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_SUPPORT_TEST_SHELL_WEBMIMEREGISTRY_IMPL_H_
6 #define WEBKIT_SUPPORT_TEST_SHELL_WEBMIMEREGISTRY_IMPL_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/compiler_specific.h"
12 #include "base/containers/hash_tables.h"
13 #include "webkit/glue/simple_webmimeregistry_impl.h"
14
15 class TestShellWebMimeRegistryImpl
16 : public webkit_glue::SimpleWebMimeRegistryImpl {
17 public:
18 TestShellWebMimeRegistryImpl();
19 virtual ~TestShellWebMimeRegistryImpl();
20
21 // Override to force that we only support types and codecs that are supported
22 // by all variations of Chromium.
23 //
24 // Media layout tests use canPlayType() to determine the test input files.
25 // Different flavours of Chromium support different codecs, which has an
26 // impact on how canPlayType() behaves. Since Chromium's baselines and
27 // expectations are generated against the common set of types, we need to
28 // prevent canPlayType() from indicating it supports other types when running
29 // layout tests.
30 virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType(
31 const WebKit::WebString&,
32 const WebKit::WebString&,
33 const WebKit::WebString&) OVERRIDE;
34
35 private:
36 bool IsBlacklistedMediaMimeType(const std::string& mime_type);
37 bool HasBlacklistedMediaCodecs(const std::vector<std::string>& codecs);
38
39 std::vector<std::string> blacklisted_media_types_;
40 std::vector<std::string> blacklisted_media_codecs_;
41
42 DISALLOW_COPY_AND_ASSIGN(TestShellWebMimeRegistryImpl);
43 };
44
45 #endif // WEBKIT_SUPPORT_TEST_SHELL_WEBMIMEREGISTRY_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/simple_webmimeregistry_impl.cc ('k') | webkit/support/test_shell_webmimeregistry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698