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

Unified Diff: content/public/common/manifest_util.h

Issue 2138973002: Initial CL for talking to the WebAPK server to generate WebAPK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_builder_impl2 Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/manifest_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/manifest_util.h
diff --git a/content/public/common/manifest_util.h b/content/public/common/manifest_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..510a9cf9b388f190168113daeae24ba278c85d15
--- /dev/null
+++ b/content/public/common/manifest_util.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_COMMON_MANIFEST_UTIL_H_
+#define CONTENT_PUBLIC_COMMON_MANIFEST_UTIL_H_
+
+#include <string>
+
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebDisplayMode.h"
+#include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h"
+
+namespace content {
+
+// Converts a blink::WebDisplayMode to a string. Returns one of
+// https://www.w3.org/TR/appmanifest/#dfn-display-modes-values. Return values
+// are lowercase. Returns an empty string for blink::WebDisplayModeUndefined.
+CONTENT_EXPORT std::string WebDisplayModeToString(
+ blink::WebDisplayMode display);
+
+// Returns the blink::WebDisplayMode which matches |display|.
+// |display| should be one of
+// https://www.w3.org/TR/appmanifest/#dfn-display-modes-values. The case of
+// |display| does not matter. Returns blink::WebDisplayModeUndefined if there is
mlamouri (slow - plz ping) 2016/08/05 12:49:12 case doesn't matter => case insensitive
+// no match.
+CONTENT_EXPORT blink::WebDisplayMode WebDisplayModeFromString(
+ const std::string& display);
+
+// Converts a blink::WebScreenOrientationLockType to a string. Returns one of
+// https://www.w3.org/TR/screen-orientation/#orientationlocktype-enum. Return
+// values are lowercase. Returns an empty string for
+// blink::WebScreenOrientationLockDefault.
+CONTENT_EXPORT std::string WebScreenOrientationLockTypeToString(
+ blink::WebScreenOrientationLockType);
+
+// Returns the blink::WebScreenOrientationLockType which matches
+// |orientation|. |orientation| should be one of
+// https://www.w3.org/TR/screen-orientation/#orientationlocktype-enum.
+// The case of |orientation| does not matter. Returns
mlamouri (slow - plz ping) 2016/08/05 12:49:12 ditto
+// blink::WebScreenOrientationLockDefault if there is no match.
+CONTENT_EXPORT blink::WebScreenOrientationLockType
+WebScreenOrientationLockTypeFromString(const std::string& orientation);
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_MANIFEST_UTIL_H_
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/manifest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698