OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // Defines all the "media" command-line switches. | 5 // Defines all the "media" command-line switches. |
6 | 6 |
7 #ifndef MEDIA_BASE_MEDIA_SWITCHES_H_ | 7 #ifndef MEDIA_BASE_MEDIA_SWITCHES_H_ |
8 #define MEDIA_BASE_MEDIA_SWITCHES_H_ | 8 #define MEDIA_BASE_MEDIA_SWITCHES_H_ |
9 | 9 |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
13 #include "media/media_features.h" | 13 #include "media/media_features.h" |
14 #include "ppapi/features/features.h" | 14 #include "ppapi/features/features.h" |
15 | 15 |
| 16 namespace base { |
| 17 class CommandLine; |
| 18 } |
| 19 |
16 namespace switches { | 20 namespace switches { |
17 | 21 |
18 MEDIA_EXPORT extern const char kAudioBufferSize[]; | 22 MEDIA_EXPORT extern const char kAudioBufferSize[]; |
19 | 23 |
20 MEDIA_EXPORT extern const char kAutoplayPolicy[]; | 24 MEDIA_EXPORT extern const char kAutoplayPolicy[]; |
21 | 25 |
22 MEDIA_EXPORT extern const char kVideoThreads[]; | 26 MEDIA_EXPORT extern const char kVideoThreads[]; |
23 | 27 |
24 MEDIA_EXPORT extern const char kEnableMediaSuspend[]; | 28 MEDIA_EXPORT extern const char kEnableMediaSuspend[]; |
25 MEDIA_EXPORT extern const char kDisableMediaSuspend[]; | 29 MEDIA_EXPORT extern const char kDisableMediaSuspend[]; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 78 |
75 MEDIA_EXPORT extern const char kForceVideoOverlays[]; | 79 MEDIA_EXPORT extern const char kForceVideoOverlays[]; |
76 | 80 |
77 MEDIA_EXPORT extern const char kMSEAudioBufferSizeLimit[]; | 81 MEDIA_EXPORT extern const char kMSEAudioBufferSizeLimit[]; |
78 MEDIA_EXPORT extern const char kMSEVideoBufferSizeLimit[]; | 82 MEDIA_EXPORT extern const char kMSEVideoBufferSizeLimit[]; |
79 | 83 |
80 MEDIA_EXPORT extern const char kIgnoreAutoplayRestrictionsForTests[]; | 84 MEDIA_EXPORT extern const char kIgnoreAutoplayRestrictionsForTests[]; |
81 | 85 |
82 namespace autoplay { | 86 namespace autoplay { |
83 | 87 |
84 MEDIA_EXPORT extern const char kCrossOriginUserGestureRequiredPolicy[]; | |
85 MEDIA_EXPORT extern const char kNoUserGestureRequiredPolicy[]; | 88 MEDIA_EXPORT extern const char kNoUserGestureRequiredPolicy[]; |
86 MEDIA_EXPORT extern const char kUserGestureRequiredPolicy[]; | 89 MEDIA_EXPORT extern const char kUserGestureRequiredPolicy[]; |
| 90 MEDIA_EXPORT extern const char kUserGestureRequiredForCrossOriginPolicy[]; |
87 | 91 |
88 } // namespace autoplay | 92 } // namespace autoplay |
89 | 93 |
90 } // namespace switches | 94 } // namespace switches |
91 | 95 |
92 namespace media { | 96 namespace media { |
93 | 97 |
94 // All features in alphabetical order. The features should be documented | 98 // All features in alphabetical order. The features should be documented |
95 // alongside the definition of their values in the .cc file. | 99 // alongside the definition of their values in the .cc file. |
96 | 100 |
(...skipping 16 matching lines...) Expand all Loading... |
113 MEDIA_EXPORT extern const base::Feature kVideoFullscreenOrientationLock; | 117 MEDIA_EXPORT extern const base::Feature kVideoFullscreenOrientationLock; |
114 MEDIA_EXPORT extern const base::Feature kVideoRotateToFullscreen; | 118 MEDIA_EXPORT extern const base::Feature kVideoRotateToFullscreen; |
115 MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense; | 119 MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense; |
116 #endif // defined(OS_ANDROID) | 120 #endif // defined(OS_ANDROID) |
117 | 121 |
118 #if defined(OS_WIN) | 122 #if defined(OS_WIN) |
119 MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoding; | 123 MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoding; |
120 MEDIA_EXPORT extern const base::Feature kMediaFoundationH264Encoding; | 124 MEDIA_EXPORT extern const base::Feature kMediaFoundationH264Encoding; |
121 #endif // defined(OS_WIN) | 125 #endif // defined(OS_WIN) |
122 | 126 |
| 127 // Based on a |command_line| and the current platform, returns the effective |
| 128 // autoplay policy. In other words, it will take into account the default policy |
| 129 // if none is specified via the command line and options passed for testing. |
| 130 // Returns one of the possible autoplay policy switches from the |
| 131 // switches::autoplay namespace. |
| 132 MEDIA_EXPORT std::string GetEffectiveAutoplayPolicy( |
| 133 const base::CommandLine& command_line); |
| 134 |
123 } // namespace media | 135 } // namespace media |
124 | 136 |
125 #endif // MEDIA_BASE_MEDIA_SWITCHES_H_ | 137 #endif // MEDIA_BASE_MEDIA_SWITCHES_H_ |
OLD | NEW |