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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // Controls whether access to File System is allowed for this frame. | 47 // Controls whether access to File System is allowed for this frame. |
48 virtual bool allowFileSystem(WebFrame*) { return true; } | 48 virtual bool allowFileSystem(WebFrame*) { return true; } |
49 | 49 |
50 // Controls whether images are allowed for this frame. | 50 // Controls whether images are allowed for this frame. |
51 virtual bool allowImage(WebFrame* frame, bool enabledPerSettings, const WebU
RL& imageURL) { return enabledPerSettings; } | 51 virtual bool allowImage(WebFrame* frame, bool enabledPerSettings, const WebU
RL& imageURL) { return enabledPerSettings; } |
52 | 52 |
53 // Controls whether access to Indexed DB are allowed for this frame. | 53 // Controls whether access to Indexed DB are allowed for this frame. |
54 virtual bool allowIndexedDB(WebFrame*, const WebString& name, const WebSecur
ityOrigin&) { return true; } | 54 virtual bool allowIndexedDB(WebFrame*, const WebString& name, const WebSecur
ityOrigin&) { return true; } |
55 | 55 |
| 56 // Controls whether HTML5 media elements (<audio>, <video>) are allowed for
this frame. |
| 57 virtual bool allowMedia(WebFrame* frame, bool enabledPerSettings, const WebU
RL& videoURL) { return enabledPerSettings; } |
| 58 |
56 // Controls whether plugins are allowed for this frame. | 59 // Controls whether plugins are allowed for this frame. |
57 virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabl
edPerSettings; } | 60 virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabl
edPerSettings; } |
58 | 61 |
59 // Controls whether scripts are allowed to execute for this frame. | 62 // Controls whether scripts are allowed to execute for this frame. |
60 virtual bool allowScript(WebFrame*, bool enabledPerSettings) { return enable
dPerSettings; } | 63 virtual bool allowScript(WebFrame*, bool enabledPerSettings) { return enable
dPerSettings; } |
61 | 64 |
62 // Controls whether scripts loaded from the given URL are allowed to execute
for this frame. | 65 // Controls whether scripts loaded from the given URL are allowed to execute
for this frame. |
63 virtual bool allowScriptFromSource(WebFrame*, bool enabledPerSettings, const
WebURL& scriptURL) { return enabledPerSettings; } | 66 virtual bool allowScriptFromSource(WebFrame*, bool enabledPerSettings, const
WebURL& scriptURL) { return enabledPerSettings; } |
64 | 67 |
65 // Controls whether insecrure content is allowed to display for this frame. | 68 // Controls whether insecrure content is allowed to display for this frame. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // Notifies the client that the frame would have executed script if script w
ere enabled. | 110 // Notifies the client that the frame would have executed script if script w
ere enabled. |
108 virtual void didNotAllowScript(WebFrame*) { } | 111 virtual void didNotAllowScript(WebFrame*) { } |
109 | 112 |
110 protected: | 113 protected: |
111 ~WebPermissionClient() { } | 114 ~WebPermissionClient() { } |
112 }; | 115 }; |
113 | 116 |
114 } // namespace WebKit | 117 } // namespace WebKit |
115 | 118 |
116 #endif | 119 #endif |
OLD | NEW |