Chromium Code Reviews| 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-fallback-display-mode | |
|
mlamouri (slow - plz ping)
2016/08/04 13:04:27
You probably meant:
https://www.w3.org/TR/appmanif
| |
| 18 CONTENT_EXPORT std::string WebDisplayModeToString( | |
| 19 blink::WebDisplayMode display); | |
| 20 | |
| 21 // Returns the blink::WebDisplayMode which matches |display_string|. | |
| 22 // |display_string| should be one of | |
| 23 // https://www.w3.org/TR/appmanifest/#dfn-fallback-display-mode. Returns | |
|
mlamouri (slow - plz ping)
2016/08/04 13:04:27
ditto
| |
| 24 // blink::WebDisplayModeUndefined if there is no match. | |
|
mlamouri (slow - plz ping)
2016/08/04 13:04:26
Add that |display_string| must be lower case?
| |
| 25 CONTENT_EXPORT blink::WebDisplayMode WebDisplayModeFromString( | |
| 26 const std::string& display_string); | |
|
mlamouri (slow - plz ping)
2016/08/04 13:04:26
nit: you use `display` in the implementation.
| |
| 27 | |
| 28 // Converts a blink::WebScreenOrientationLockType to a string. Returns one of | |
| 29 // https://www.w3.org/TR/screen-orientation/#orientationlocktype-enum | |
|
mlamouri (slow - plz ping)
2016/08/04 13:04:27
Maybe note that WebScreenOrientationLockDefault wi
| |
| 30 CONTENT_EXPORT std::string WebScreenOrientationLockTypeToString( | |
| 31 blink::WebScreenOrientationLockType); | |
|
mlamouri (slow - plz ping)
2016/08/04 13:04:27
style: add parameter name.
| |
| 32 | |
| 33 // Returns the blink::WebScreenOrientationLockType which matches | |
| 34 // |orientation_string|. |orientation_string| should be one of | |
|
mlamouri (slow - plz ping)
2016/08/04 13:04:27
see below
| |
| 35 // https://www.w3.org/TR/screen-orientation/#orientationlocktype-enum. Returns | |
| 36 // blink::WebScreenOrientationLockDefault if there is no match. | |
| 37 CONTENT_EXPORT blink::WebScreenOrientationLockType | |
| 38 WebScreenOrientationLockTypeFromString(const std::string& orientation_string); | |
|
mlamouri (slow - plz ping)
2016/08/04 13:04:27
s/orientation_string/orientation/ to match the imp
| |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_UTIL_H_ | |
| OLD | NEW |