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 virtual ~WebContentSettings(); | 18 ~WebContentSettings() override; |
19 | 19 |
20 // blink::WebContentSettingsClient: | 20 // blink::WebContentSettingsClient: |
21 virtual bool allowImage(bool enabledPerSettings, | 21 bool allowImage(bool enabledPerSettings, |
22 const blink::WebURL& imageURL); | 22 const blink::WebURL& imageURL) override; |
23 virtual bool allowMedia(const blink::WebURL& mediaURL); | 23 bool allowMedia(const blink::WebURL& mediaURL) override; |
24 virtual bool allowScriptFromSource(bool enabledPerSettings, | 24 bool allowScriptFromSource(bool enabledPerSettings, |
25 const blink::WebURL& scriptURL); | 25 const blink::WebURL& scriptURL) override; |
26 virtual bool allowStorage(bool local); | 26 bool allowStorage(bool local) override; |
27 virtual bool allowPlugins(bool enabledPerSettings); | 27 bool allowPlugins(bool enabledPerSettings) override; |
28 virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, | 28 bool allowDisplayingInsecureContent(bool enabledPerSettings, |
29 const blink::WebSecurityOrigin&, | 29 const blink::WebSecurityOrigin&, |
30 const blink::WebURL&); | 30 const blink::WebURL&) override; |
31 virtual bool allowRunningInsecureContent(bool enabledPerSettings, | 31 bool allowRunningInsecureContent(bool enabledPerSettings, |
32 const blink::WebSecurityOrigin&, | 32 const blink::WebSecurityOrigin&, |
33 const blink::WebURL&); | 33 const blink::WebURL&) override; |
34 | 34 |
35 // Hooks to set the different policies. | 35 // Hooks to set the different policies. |
36 void SetImagesAllowed(bool); | 36 void SetImagesAllowed(bool); |
37 void SetMediaAllowed(bool); | 37 void SetMediaAllowed(bool); |
38 void SetScriptsAllowed(bool); | 38 void SetScriptsAllowed(bool); |
39 void SetStorageAllowed(bool); | 39 void SetStorageAllowed(bool); |
40 void SetPluginsAllowed(bool); | 40 void SetPluginsAllowed(bool); |
41 void SetDisplayingInsecureContentAllowed(bool); | 41 void SetDisplayingInsecureContentAllowed(bool); |
42 void SetRunningInsecureContentAllowed(bool); | 42 void SetRunningInsecureContentAllowed(bool); |
43 | 43 |
(...skipping 14 matching lines...) Expand all Loading... |
58 bool plugins_allowed_; | 58 bool plugins_allowed_; |
59 bool displaying_insecure_content_allowed_; | 59 bool displaying_insecure_content_allowed_; |
60 bool running_insecure_content_allowed_; | 60 bool running_insecure_content_allowed_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(WebContentSettings); | 62 DISALLOW_COPY_AND_ASSIGN(WebContentSettings); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace test_runner | 65 } // namespace test_runner |
66 | 66 |
67 #endif // COMPONENTS_TEST_RUNNER_WEB_CONTENT_SETTINGS_H_ | 67 #endif // COMPONENTS_TEST_RUNNER_WEB_CONTENT_SETTINGS_H_ |
OLD | NEW |