Index: content/shell/renderer/test_runner/web_permissions.h |
diff --git a/content/shell/renderer/test_runner/WebPermissions.h b/content/shell/renderer/test_runner/web_permissions.h |
similarity index 17% |
rename from content/shell/renderer/test_runner/WebPermissions.h |
rename to content/shell/renderer/test_runner/web_permissions.h |
index 09656f56cc7b41cad992f92921df9fd1c66e4ce0..e13df36ffafb4fafe5fa39ddfc79d9fcc64d7d26 100644 |
--- a/content/shell/renderer/test_runner/WebPermissions.h |
+++ b/content/shell/renderer/test_runner/web_permissions.h |
@@ -2,11 +2,10 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_ |
-#define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_ |
+#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_PERMISSIONS_H_ |
+#define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_PERMISSIONS_H_ |
#include "base/macros.h" |
-#include "third_party/WebKit/public/web/WebFrame.h" |
#include "third_party/WebKit/public/web/WebPermissionClient.h" |
namespace content { |
@@ -14,49 +13,55 @@ namespace content { |
class WebTestDelegate; |
class WebPermissions : public blink::WebPermissionClient { |
-public: |
- WebPermissions(); |
- virtual ~WebPermissions(); |
- |
- // Override WebPermissionClient methods. |
- virtual bool allowImage(bool enabledPerSettings, const blink::WebURL& imageURL); |
- virtual bool allowMedia(const blink::WebURL& mediaURL); |
- virtual bool allowScriptFromSource(bool enabledPerSettings, const blink::WebURL& scriptURL); |
- virtual bool allowStorage(bool local); |
- virtual bool allowPlugins(bool enabledPerSettings); |
- virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, const blink::WebSecurityOrigin&, const blink::WebURL&); |
- virtual bool allowRunningInsecureContent(bool enabledPerSettings, const blink::WebSecurityOrigin&, const blink::WebURL&); |
- |
- // Hooks to set the different policies. |
- void setImagesAllowed(bool); |
- void setMediaAllowed(bool); |
- void setScriptsAllowed(bool); |
- void setStorageAllowed(bool); |
- void setPluginsAllowed(bool); |
- void setDisplayingInsecureContentAllowed(bool); |
- void setRunningInsecureContentAllowed(bool); |
- |
- // Resets the policy to allow everything, except for running insecure content. |
- void reset(); |
- |
- void setDelegate(WebTestDelegate*); |
- void setDumpCallbacks(bool); |
- |
-private: |
- WebTestDelegate* m_delegate; |
- bool m_dumpCallbacks; |
- |
- bool m_imagesAllowed; |
- bool m_mediaAllowed; |
- bool m_scriptsAllowed; |
- bool m_storageAllowed; |
- bool m_pluginsAllowed; |
- bool m_displayingInsecureContentAllowed; |
- bool m_runningInsecureContentAllowed; |
- |
- DISALLOW_COPY_AND_ASSIGN(WebPermissions); |
+ public: |
+ WebPermissions(); |
+ virtual ~WebPermissions(); |
+ |
+ // blink::WebPermissionClient: |
+ virtual bool allowImage(bool enabledPerSettings, |
+ const blink::WebURL& imageURL); |
+ virtual bool allowMedia(const blink::WebURL& mediaURL); |
+ virtual bool allowScriptFromSource(bool enabledPerSettings, |
+ const blink::WebURL& scriptURL); |
+ virtual bool allowStorage(bool local); |
+ virtual bool allowPlugins(bool enabledPerSettings); |
+ virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, |
+ const blink::WebSecurityOrigin&, |
+ const blink::WebURL&); |
+ virtual bool allowRunningInsecureContent(bool enabledPerSettings, |
+ const blink::WebSecurityOrigin&, |
+ const blink::WebURL&); |
+ |
+ // Hooks to set the different policies. |
+ void SetImagesAllowed(bool); |
+ void SetMediaAllowed(bool); |
+ void SetScriptsAllowed(bool); |
+ void SetStorageAllowed(bool); |
+ void SetPluginsAllowed(bool); |
+ void SetDisplayingInsecureContentAllowed(bool); |
+ void SetRunningInsecureContentAllowed(bool); |
+ |
+ void SetDelegate(WebTestDelegate*); |
+ void SetDumpCallbacks(bool); |
+ |
+ // Resets the policy to allow everything, except for running insecure content. |
+ void Reset(); |
+ |
+ private: |
+ WebTestDelegate* delegate_; |
+ bool dump_callbacks_; |
+ |
+ bool images_allowed_; |
+ bool media_allowed_; |
+ bool scripts_allowed_; |
+ bool storage_allowed_; |
+ bool plugins_allowed_; |
+ bool displaying_insecure_content_allowed_; |
+ bool running_insecure_content_allowed_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(WebPermissions); |
}; |
} // namespace content |
-#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_ |
+#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_PERMISSIONS_H_ |