| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 return enabledPerSettings; | 59 return enabledPerSettings; |
| 60 } | 60 } |
| 61 | 61 |
| 62 // Controls whether insecure scripts are allowed to execute for this frame. | 62 // Controls whether insecure scripts are allowed to execute for this frame. |
| 63 virtual bool allowRunningInsecureContent(bool enabledPerSettings, | 63 virtual bool allowRunningInsecureContent(bool enabledPerSettings, |
| 64 const WebSecurityOrigin&, | 64 const WebSecurityOrigin&, |
| 65 const WebURL&) { | 65 const WebURL&) { |
| 66 return enabledPerSettings; | 66 return enabledPerSettings; |
| 67 } | 67 } |
| 68 | 68 |
| 69 // Controls whether the given script extension should run in a new script | |
| 70 // context in this frame. If extensionGroup is 0, the script context is the | |
| 71 // frame's main context. Otherwise, it is a context created by | |
| 72 // WebLocalFrame::executeScriptInIsolatedWorld with that same extensionGroup | |
| 73 // value. | |
| 74 virtual bool allowScriptExtension(const WebString& extensionName, | |
| 75 int extensionGroup) { | |
| 76 return true; | |
| 77 } | |
| 78 | |
| 79 virtual bool allowScriptExtension(const WebString& extensionName, | |
| 80 int extensionGroup, | |
| 81 int worldId) { | |
| 82 return allowScriptExtension(extensionName, extensionGroup); | |
| 83 } | |
| 84 | |
| 85 // Controls whether HTML5 Web Storage is allowed for this frame. | 69 // Controls whether HTML5 Web Storage is allowed for this frame. |
| 86 // If local is true, then this is for local storage, otherwise it's for | 70 // If local is true, then this is for local storage, otherwise it's for |
| 87 // session storage. | 71 // session storage. |
| 88 virtual bool allowStorage(bool local) { return true; } | 72 virtual bool allowStorage(bool local) { return true; } |
| 89 | 73 |
| 90 // Controls whether access to read the clipboard is allowed for this frame. | 74 // Controls whether access to read the clipboard is allowed for this frame. |
| 91 virtual bool allowReadFromClipboard(bool defaultValue) { | 75 virtual bool allowReadFromClipboard(bool defaultValue) { |
| 92 return defaultValue; | 76 return defaultValue; |
| 93 } | 77 } |
| 94 | 78 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 117 // Notifies the client that the frame would have executed script if script | 101 // Notifies the client that the frame would have executed script if script |
| 118 // were enabled. | 102 // were enabled. |
| 119 virtual void didNotAllowScript() {} | 103 virtual void didNotAllowScript() {} |
| 120 | 104 |
| 121 virtual ~WebContentSettingsClient() {} | 105 virtual ~WebContentSettingsClient() {} |
| 122 }; | 106 }; |
| 123 | 107 |
| 124 } // namespace blink | 108 } // namespace blink |
| 125 | 109 |
| 126 #endif // WebContentSettingsClient_h | 110 #endif // WebContentSettingsClient_h |
| OLD | NEW |