OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Controls whether access to File System is allowed for this frame. | 51 // Controls whether access to File System is allowed for this frame. |
52 virtual void requestFileSystemAccessAsync(const WebPermissionCallbacks& call
backs) { WebPermissionCallbacks permissionCallbacks(callbacks); permissionCallba
cks.doAllow(); } | 52 virtual void requestFileSystemAccessAsync(const WebPermissionCallbacks& call
backs) { WebPermissionCallbacks permissionCallbacks(callbacks); permissionCallba
cks.doAllow(); } |
53 | 53 |
54 // Controls whether images are allowed for this frame. | 54 // Controls whether images are allowed for this frame. |
55 virtual bool allowImage(bool enabledPerSettings, const WebURL& imageURL) { r
eturn enabledPerSettings; } | 55 virtual bool allowImage(bool enabledPerSettings, const WebURL& imageURL) { r
eturn enabledPerSettings; } |
56 | 56 |
57 // Controls whether access to Indexed DB are allowed for this frame. | 57 // Controls whether access to Indexed DB are allowed for this frame. |
58 virtual bool allowIndexedDB(const WebString& name, const WebSecurityOrigin&)
{ return true; } | 58 virtual bool allowIndexedDB(const WebString& name, const WebSecurityOrigin&)
{ return true; } |
59 | 59 |
| 60 // Controls whether HTML5 media elements (<audio>, <video>) are allowed for
this frame. |
| 61 virtual bool allowMedia(const WebURL& videoURL) { return true; } |
| 62 |
60 // Controls whether plugins are allowed for this frame. | 63 // Controls whether plugins are allowed for this frame. |
61 virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettin
gs; } | 64 virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettin
gs; } |
62 | 65 |
63 // Controls whether scripts are allowed to execute for this frame. | 66 // Controls whether scripts are allowed to execute for this frame. |
64 virtual bool allowScript(bool enabledPerSettings) { return enabledPerSetting
s; } | 67 virtual bool allowScript(bool enabledPerSettings) { return enabledPerSetting
s; } |
65 | 68 |
66 // Controls whether scripts loaded from the given URL are allowed to execute
for this frame. | 69 // Controls whether scripts loaded from the given URL are allowed to execute
for this frame. |
67 virtual bool allowScriptFromSource(bool enabledPerSettings, const WebURL& sc
riptURL) { return enabledPerSettings; } | 70 virtual bool allowScriptFromSource(bool enabledPerSettings, const WebURL& sc
riptURL) { return enabledPerSettings; } |
68 | 71 |
69 // Controls whether insecrure content is allowed to display for this frame. | 72 // Controls whether insecrure content is allowed to display for this frame. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // Notifies the client that the frame would have executed script if script w
ere enabled. | 114 // Notifies the client that the frame would have executed script if script w
ere enabled. |
112 virtual void didNotAllowScript() { } | 115 virtual void didNotAllowScript() { } |
113 | 116 |
114 protected: | 117 protected: |
115 ~WebPermissionClient() { } | 118 ~WebPermissionClient() { } |
116 }; | 119 }; |
117 | 120 |
118 } // namespace blink | 121 } // namespace blink |
119 | 122 |
120 #endif | 123 #endif |
OLD | NEW |