OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebContentSettingsClient_h | 5 #ifndef WebContentSettingsClient_h |
6 #define WebContentSettingsClient_h | 6 #define WebContentSettingsClient_h |
7 | 7 |
8 #include "public/platform/WebContentSettingCallbacks.h" | 8 #include "public/platform/WebContentSettingCallbacks.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Controls whether plugins are allowed for this frame. | 33 // Controls whether plugins are allowed for this frame. |
34 virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettin
gs; } | 34 virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettin
gs; } |
35 | 35 |
36 // Controls whether scripts are allowed to execute for this frame. | 36 // Controls whether scripts are allowed to execute for this frame. |
37 virtual bool allowScript(bool enabledPerSettings) { return enabledPerSetting
s; } | 37 virtual bool allowScript(bool enabledPerSettings) { return enabledPerSetting
s; } |
38 | 38 |
39 // Controls whether scripts loaded from the given URL are allowed to execute
for this frame. | 39 // Controls whether scripts loaded from the given URL are allowed to execute
for this frame. |
40 virtual bool allowScriptFromSource(bool enabledPerSettings, const WebURL& sc
riptURL) { return enabledPerSettings; } | 40 virtual bool allowScriptFromSource(bool enabledPerSettings, const WebURL& sc
riptURL) { return enabledPerSettings; } |
41 | 41 |
42 // Controls whether insecrure content is allowed to display for this frame. | 42 // Controls whether insecure scripts are allowed to execute for this frame. |
43 virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, const W
ebURL&) { return enabledPerSettings; } | |
44 | |
45 // Controls whether insecrure scripts are allowed to execute for this frame. | |
46 virtual bool allowRunningInsecureContent(bool enabledPerSettings, const WebS
ecurityOrigin&, const WebURL&) { return enabledPerSettings; } | 43 virtual bool allowRunningInsecureContent(bool enabledPerSettings, const WebS
ecurityOrigin&, const WebURL&) { return enabledPerSettings; } |
47 | 44 |
48 // Controls whether the given script extension should run in a new script | 45 // Controls whether the given script extension should run in a new script |
49 // context in this frame. If extensionGroup is 0, the script context is the | 46 // context in this frame. If extensionGroup is 0, the script context is the |
50 // frame's main context. Otherwise, it is a context created by | 47 // frame's main context. Otherwise, it is a context created by |
51 // WebLocalFrame::executeScriptInIsolatedWorld with that same extensionGroup | 48 // WebLocalFrame::executeScriptInIsolatedWorld with that same extensionGroup |
52 // value. | 49 // value. |
53 virtual bool allowScriptExtension(const WebString& extensionName, int extens
ionGroup) { return true; } | 50 virtual bool allowScriptExtension(const WebString& extensionName, int extens
ionGroup) { return true; } |
54 | 51 |
55 virtual bool allowScriptExtension(const WebString& extensionName, int extens
ionGroup, int worldId) | 52 virtual bool allowScriptExtension(const WebString& extensionName, int extens
ionGroup, int worldId) |
(...skipping 15 matching lines...) Expand all Loading... |
71 virtual bool allowWebComponents(bool defaultValue) { return defaultValue; } | 68 virtual bool allowWebComponents(bool defaultValue) { return defaultValue; } |
72 | 69 |
73 // Controls whether to enable MutationEvents for this frame. | 70 // Controls whether to enable MutationEvents for this frame. |
74 // The common use case of this method is actually to selectively disable Mut
ationEvents, | 71 // The common use case of this method is actually to selectively disable Mut
ationEvents, |
75 // but it's been named for consistency with the rest of the interface. | 72 // but it's been named for consistency with the rest of the interface. |
76 virtual bool allowMutationEvents(bool defaultValue) { return defaultValue; } | 73 virtual bool allowMutationEvents(bool defaultValue) { return defaultValue; } |
77 | 74 |
78 // Controls whether autoplay is allowed for this frame. | 75 // Controls whether autoplay is allowed for this frame. |
79 virtual bool allowAutoplay(bool defaultValue) { return defaultValue; } | 76 virtual bool allowAutoplay(bool defaultValue) { return defaultValue; } |
80 | 77 |
| 78 // Reports that passive mixed content was found at the provided URL. |
| 79 virtual void passiveInsecureContentFound(const WebURL&) {} |
| 80 |
81 // Notifies the client that the frame would have instantiated a plugin if pl
ugins were enabled. | 81 // Notifies the client that the frame would have instantiated a plugin if pl
ugins were enabled. |
82 virtual void didNotAllowPlugins() { } | 82 virtual void didNotAllowPlugins() { } |
83 | 83 |
84 // Notifies the client that the frame would have executed script if script w
ere enabled. | 84 // Notifies the client that the frame would have executed script if script w
ere enabled. |
85 virtual void didNotAllowScript() { } | 85 virtual void didNotAllowScript() { } |
86 | 86 |
87 // Notifies the client that the frame instantiated a keygen element. | 87 // Notifies the client that the frame instantiated a keygen element. |
88 virtual void didUseKeygen() { } | 88 virtual void didUseKeygen() { } |
89 | 89 |
90 virtual ~WebContentSettingsClient() { } | 90 virtual ~WebContentSettingsClient() { } |
91 }; | 91 }; |
92 | 92 |
93 } // namespace blink | 93 } // namespace blink |
94 | 94 |
95 #endif // WebContentSettingsClient_h | 95 #endif // WebContentSettingsClient_h |
OLD | NEW |