| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_WEB_CONTENT_SETTINGS_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_CONTENT_SETTINGS_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_CONTENT_SETTINGS_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_CONTENT_SETTINGS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "third_party/WebKit/public/web/WebContentSettingsClient.h" | 9 #include "third_party/WebKit/public/web/WebContentSettingsClient.h" |
| 10 | 10 |
| 11 namespace test_runner { | 11 namespace test_runner { |
| 12 | 12 |
| 13 class WebTestDelegate; | 13 class WebTestDelegate; |
| 14 | 14 |
| 15 class WebContentSettings : public blink::WebContentSettingsClient { | 15 class WebContentSettings : public blink::WebContentSettingsClient { |
| 16 public: | 16 public: |
| 17 WebContentSettings(); | 17 WebContentSettings(); |
| 18 ~WebContentSettings() override; | 18 ~WebContentSettings() override; |
| 19 | 19 |
| 20 // blink::WebContentSettingsClient: | 20 // blink::WebContentSettingsClient: |
| 21 bool allowImage(bool enabledPerSettings, | 21 bool allowImage(bool enabledPerSettings, |
| 22 const blink::WebURL& imageURL) override; | 22 const blink::WebURL& imageURL) override; |
| 23 bool allowMedia(const blink::WebURL& mediaURL) override; | 23 bool allowMedia(const blink::WebURL& mediaURL) override; |
| 24 bool allowScriptFromSource(bool enabledPerSettings, | 24 bool allowScriptFromSource(bool enabledPerSettings, |
| 25 const blink::WebURL& scriptURL) override; | 25 const blink::WebURL& scriptURL) override; |
| 26 bool allowStorage(bool local) override; | 26 bool allowStorage(bool local) override; |
| 27 bool allowPlugins(bool enabledPerSettings) override; | 27 bool allowPlugins(bool enabledPerSettings) override; |
| 28 bool allowDisplayingInsecureContent(bool enabledPerSettings, | 28 bool allowDisplayingInsecureContent(bool enabledPerSettings, |
| 29 const blink::WebSecurityOrigin&, | |
| 30 const blink::WebURL&) override; | 29 const blink::WebURL&) override; |
| 31 bool allowRunningInsecureContent(bool enabledPerSettings, | 30 bool allowRunningInsecureContent(bool enabledPerSettings, |
| 32 const blink::WebSecurityOrigin&, | 31 const blink::WebSecurityOrigin&, |
| 33 const blink::WebURL&) override; | 32 const blink::WebURL&) override; |
| 34 | 33 |
| 35 // Hooks to set the different policies. | 34 // Hooks to set the different policies. |
| 36 void SetImagesAllowed(bool); | 35 void SetImagesAllowed(bool); |
| 37 void SetMediaAllowed(bool); | 36 void SetMediaAllowed(bool); |
| 38 void SetScriptsAllowed(bool); | 37 void SetScriptsAllowed(bool); |
| 39 void SetStorageAllowed(bool); | 38 void SetStorageAllowed(bool); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 58 bool plugins_allowed_; | 57 bool plugins_allowed_; |
| 59 bool displaying_insecure_content_allowed_; | 58 bool displaying_insecure_content_allowed_; |
| 60 bool running_insecure_content_allowed_; | 59 bool running_insecure_content_allowed_; |
| 61 | 60 |
| 62 DISALLOW_COPY_AND_ASSIGN(WebContentSettings); | 61 DISALLOW_COPY_AND_ASSIGN(WebContentSettings); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 } // namespace test_runner | 64 } // namespace test_runner |
| 66 | 65 |
| 67 #endif // COMPONENTS_TEST_RUNNER_WEB_CONTENT_SETTINGS_H_ | 66 #endif // COMPONENTS_TEST_RUNNER_WEB_CONTENT_SETTINGS_H_ |
| OLD | NEW |