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

Unified Diff: third_party/WebKit/public/platform/WebFeaturePolicyFeature.h

Issue 2815003005: Integrate WebUSB with Feature Policy (Closed)
Patch Set: Rebased Created 3 years, 7 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 | « third_party/WebKit/public/platform/WebFeaturePolicy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebFeaturePolicyFeature.h
diff --git a/third_party/WebKit/public/platform/WebFeaturePolicy.h b/third_party/WebKit/public/platform/WebFeaturePolicyFeature.h
similarity index 59%
copy from third_party/WebKit/public/platform/WebFeaturePolicy.h
copy to third_party/WebKit/public/platform/WebFeaturePolicyFeature.h
index 95ac512c6c138fee5c262e6d9c6c13c7841ec0e6..d400770c1e82657c802ae3ca0f00cee1603b0c32 100644
--- a/third_party/WebKit/public/platform/WebFeaturePolicy.h
+++ b/third_party/WebKit/public/platform/WebFeaturePolicyFeature.h
@@ -1,14 +1,9 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2017 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 WebFeaturePolicy_h
-#define WebFeaturePolicy_h
-
-#include "WebCommon.h"
-#include "WebSecurityOrigin.h"
-#include "WebString.h"
-#include "WebVector.h"
+#ifndef WebFeaturePolicyFeature_h
+#define WebFeaturePolicyFeature_h
namespace blink {
@@ -54,31 +49,11 @@ enum class WebFeaturePolicyFeature {
kSyncXHR,
// Controls access to RTCPeerConnection interface.
kWebRTC,
- LAST_FEATURE = kWebRTC
-};
-
-struct BLINK_PLATFORM_EXPORT WebParsedFeaturePolicyDeclaration {
- WebParsedFeaturePolicyDeclaration() : matches_all_origins(false) {}
- WebFeaturePolicyFeature feature;
- bool matches_all_origins;
- WebVector<WebSecurityOrigin> origins;
-};
-
-// Used in Blink code to represent parsed headers. Used for IPC between renderer
-// and browser.
-using WebParsedFeaturePolicy = WebVector<WebParsedFeaturePolicyDeclaration>;
-
-// Composed full policy for a document. Stored in SecurityContext for each
-// document. This is essentially an opaque handle to an object in the embedder.
-class BLINK_PLATFORM_EXPORT WebFeaturePolicy {
- public:
- virtual ~WebFeaturePolicy() {}
-
- // Returns whether or not the given feature is enabled for the origin of the
- // document that owns the policy.
- virtual bool IsFeatureEnabled(blink::WebFeaturePolicyFeature) const = 0;
+ // Controls access to the WebUSB API.
+ kUsb,
+ LAST_FEATURE = kUsb
};
} // namespace blink
-#endif // WebFeaturePolicy_h
+#endif // WebFeaturePolicyFeature_h
« no previous file with comments | « third_party/WebKit/public/platform/WebFeaturePolicy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698