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

Unified Diff: components/content_settings/core/common/content_settings.mojom

Issue 2582203003: Convert SetContentSettingRules to use mojo, part 1/2. (Closed)
Patch Set: Convert SetContentSettingRules to use mojo, part 1/2. Created 4 years 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
Index: components/content_settings/core/common/content_settings.mojom
diff --git a/components/content_settings/core/common/content_settings.mojom b/components/content_settings/core/common/content_settings.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..13eb6ab4b1d8e08bbae44b25b645abf3df48e613
--- /dev/null
+++ b/components/content_settings/core/common/content_settings.mojom
@@ -0,0 +1,49 @@
+// 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.
+
+module content_settings.mojom;
+
+// This mirrors the C++ type in content_settings_pattern.h.
+struct PatternParts {
+ string scheme;
+ bool is_scheme_wildcard;
+ string host;
+ bool has_domain_wildcard;
+ string port;
+ bool is_port_wildcard;
+ string path;
+ bool is_path_wildcard;
+};
+
+// This mirrors the C++ type in content_settings_pattern.h.
+struct ContentSettingsPattern {
+ PatternParts parts;
+ bool is_valid;
+};
+
+// This mirrors the C++ type in content_settings.h.
+enum ContentSetting {
+ DEFAULT = 0,
+ ALLOW,
+ BLOCK,
+ ASK,
+ SESSION_ONLY,
+ DETECT_IMPORTANT_CONTENT
+};
+
+// This mirrors the C++ type in content_settings.h.
+struct ContentSettingPatternSource {
+ ContentSettingsPattern primary_pattern;
+ ContentSettingsPattern secondary_pattern;
+ ContentSetting setting;
+ string source;
+ bool incognito;
+};
+
+// This mirrors the C++ type in content_settings.h.
+struct RendererContentSettingRules {
+ array<ContentSettingPatternSource> image_rules;
+ array<ContentSettingPatternSource> script_rules;
+ array<ContentSettingPatternSource> autoplay_rules;
+};

Powered by Google App Engine
This is Rietveld 408576698