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 module content_settings.mojom; | |
| 6 | |
| 7 // This mirrors the C++ type in content_settings_pattern.h. | |
| 8 struct PatternParts { | |
| 9 string scheme; | |
|
Tom Sepez
2017/01/03 19:16:02
Are there any assumptions on the receiving end abo
nigeltao1
2017/01/04 23:53:38
I've copy/pasted the comments from the C++ Pattern
| |
| 10 bool is_scheme_wildcard; | |
| 11 string host; | |
| 12 bool has_domain_wildcard; | |
|
Tom Sepez
2017/01/03 19:16:02
nit: has_host_wildcard?
nigeltao1
2017/01/04 23:53:38
As per those copy/pasted comments, the host might
| |
| 13 string port; | |
| 14 bool is_port_wildcard; | |
| 15 string path; | |
| 16 bool is_path_wildcard; | |
| 17 }; | |
| 18 | |
| 19 // This mirrors the C++ type in content_settings_pattern.h. | |
| 20 struct ContentSettingsPattern { | |
| 21 PatternParts parts; | |
| 22 bool is_valid; | |
| 23 }; | |
| 24 | |
| 25 // This mirrors the C++ type in content_settings.h. | |
| 26 enum ContentSetting { | |
| 27 DEFAULT = 0, | |
| 28 ALLOW, | |
| 29 BLOCK, | |
| 30 ASK, | |
| 31 SESSION_ONLY, | |
| 32 DETECT_IMPORTANT_CONTENT | |
| 33 }; | |
| 34 | |
| 35 // This mirrors the C++ type in content_settings.h. | |
| 36 struct ContentSettingPatternSource { | |
| 37 ContentSettingsPattern primary_pattern; | |
| 38 ContentSettingsPattern secondary_pattern; | |
| 39 ContentSetting setting; | |
| 40 string source; | |
| 41 bool incognito; | |
| 42 }; | |
| 43 | |
| 44 // This mirrors the C++ type in content_settings.h. | |
| 45 struct RendererContentSettingRules { | |
| 46 array<ContentSettingPatternSource> image_rules; | |
| 47 array<ContentSettingPatternSource> script_rules; | |
| 48 array<ContentSettingPatternSource> autoplay_rules; | |
| 49 }; | |
| OLD | NEW |