| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 CONTENT_PUBLIC_COMMON_MANIFEST_UTIL_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_MANIFEST_UTIL_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "content/common/content_export.h" |
| 11 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
| 12 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 // Converts a blink::WebDisplayMode to a string. Returns one of |
| 17 // https://www.w3.org/TR/appmanifest/#dfn-display-modes-values. Return values |
| 18 // are lowercase. Returns an empty string for blink::WebDisplayModeUndefined. |
| 19 CONTENT_EXPORT std::string WebDisplayModeToString( |
| 20 blink::WebDisplayMode display); |
| 21 |
| 22 // Returns the blink::WebDisplayMode which matches |display|. |
| 23 // |display| should be one of |
| 24 // https://www.w3.org/TR/appmanifest/#dfn-display-modes-values. |display| is |
| 25 // case insensitive. Returns blink::WebDisplayModeUndefined if there is no |
| 26 // match. |
| 27 CONTENT_EXPORT blink::WebDisplayMode WebDisplayModeFromString( |
| 28 const std::string& display); |
| 29 |
| 30 // Converts a blink::WebScreenOrientationLockType to a string. Returns one of |
| 31 // https://www.w3.org/TR/screen-orientation/#orientationlocktype-enum. Return |
| 32 // values are lowercase. Returns an empty string for |
| 33 // blink::WebScreenOrientationLockDefault. |
| 34 CONTENT_EXPORT std::string WebScreenOrientationLockTypeToString( |
| 35 blink::WebScreenOrientationLockType); |
| 36 |
| 37 // Returns the blink::WebScreenOrientationLockType which matches |
| 38 // |orientation|. |orientation| should be one of |
| 39 // https://www.w3.org/TR/screen-orientation/#orientationlocktype-enum. |
| 40 // |orientation| is case insensitive. Returns |
| 41 // blink::WebScreenOrientationLockDefault if there is no match. |
| 42 CONTENT_EXPORT blink::WebScreenOrientationLockType |
| 43 WebScreenOrientationLockTypeFromString(const std::string& orientation); |
| 44 |
| 45 } // namespace content |
| 46 |
| 47 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_UTIL_H_ |
| OLD | NEW |