| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "third_party/WebKit/public/web/WebPermissionClient.h" | 9 #include "third_party/WebKit/public/web/WebPermissionClient.h" |
| 10 | 10 |
| 11 namespace WebTestRunner { | 11 namespace WebTestRunner { |
| 12 | 12 |
| 13 class WebTestDelegate; | 13 class WebTestDelegate; |
| 14 | 14 |
| 15 class WebPermissions : public blink::WebPermissionClient { | 15 class WebPermissions : public blink::WebPermissionClient { |
| 16 public: | 16 public: |
| 17 WebPermissions(); | 17 WebPermissions(); |
| 18 virtual ~WebPermissions(); | 18 virtual ~WebPermissions(); |
| 19 | 19 |
| 20 // Override WebPermissionClient methods. | 20 // Override WebPermissionClient methods. |
| 21 // TODO(jam): remove all these methods after Blink rolls. | 21 // TODO(jam): remove all these methods after Blink rolls. |
| 22 virtual bool allowImage(blink::WebFrame*, bool enabledPerSettings, const bli
nk::WebURL& imageURL); | 22 virtual bool allowImage(blink::WebLocalFrame*, bool enabledPerSettings, cons
t blink::WebURL& imageURL); |
| 23 virtual bool allowScriptFromSource(blink::WebFrame*, bool enabledPerSettings
, const blink::WebURL& scriptURL); | 23 virtual bool allowScriptFromSource(blink::WebLocalFrame*, bool enabledPerSet
tings, const blink::WebURL& scriptURL); |
| 24 virtual bool allowStorage(blink::WebFrame*, bool local); | 24 virtual bool allowStorage(blink::WebLocalFrame*, bool local); |
| 25 virtual bool allowPlugins(blink::WebFrame*, bool enabledPerSettings); | 25 virtual bool allowPlugins(blink::WebLocalFrame*, bool enabledPerSettings); |
| 26 virtual bool allowDisplayingInsecureContent(blink::WebFrame*, bool enabledPe
rSettings, const blink::WebSecurityOrigin&, const blink::WebURL&); | 26 virtual bool allowDisplayingInsecureContent(blink::WebLocalFrame*, bool enab
ledPerSettings, const blink::WebSecurityOrigin&, const blink::WebURL&); |
| 27 virtual bool allowRunningInsecureContent(blink::WebFrame*, bool enabledPerSe
ttings, const blink::WebSecurityOrigin&, const blink::WebURL&); | 27 virtual bool allowRunningInsecureContent(blink::WebLocalFrame*, bool enabled
PerSettings, const blink::WebSecurityOrigin&, const blink::WebURL&); |
| 28 | 28 |
| 29 virtual bool allowImage(bool enabledPerSettings, const blink::WebURL& imageU
RL); | 29 virtual bool allowImage(bool enabledPerSettings, const blink::WebURL& imageU
RL); |
| 30 virtual bool allowScriptFromSource(bool enabledPerSettings, const blink::Web
URL& scriptURL); | 30 virtual bool allowScriptFromSource(bool enabledPerSettings, const blink::Web
URL& scriptURL); |
| 31 virtual bool allowStorage(bool local); | 31 virtual bool allowStorage(bool local); |
| 32 virtual bool allowPlugins(bool enabledPerSettings); | 32 virtual bool allowPlugins(bool enabledPerSettings); |
| 33 virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, const b
link::WebSecurityOrigin&, const blink::WebURL&); | 33 virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, const b
link::WebSecurityOrigin&, const blink::WebURL&); |
| 34 virtual bool allowRunningInsecureContent(bool enabledPerSettings, const blin
k::WebSecurityOrigin&, const blink::WebURL&); | 34 virtual bool allowRunningInsecureContent(bool enabledPerSettings, const blin
k::WebSecurityOrigin&, const blink::WebURL&); |
| 35 | 35 |
| 36 // Hooks to set the different policies. | 36 // Hooks to set the different policies. |
| 37 void setImagesAllowed(bool); | 37 void setImagesAllowed(bool); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 57 bool m_pluginsAllowed; | 57 bool m_pluginsAllowed; |
| 58 bool m_displayingInsecureContentAllowed; | 58 bool m_displayingInsecureContentAllowed; |
| 59 bool m_runningInsecureContentAllowed; | 59 bool m_runningInsecureContentAllowed; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(WebPermissions); | 61 DISALLOW_COPY_AND_ASSIGN(WebPermissions); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } | 64 } |
| 65 | 65 |
| 66 #endif | 66 #endif |
| OLD | NEW |