| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
| 6 #define CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 6 #define CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 bool enabled_per_settings, | 54 bool enabled_per_settings, |
| 55 const WebKit::WebURL& image_url); | 55 const WebKit::WebURL& image_url); |
| 56 bool AllowIndexedDB(WebKit::WebFrame* frame, | 56 bool AllowIndexedDB(WebKit::WebFrame* frame, |
| 57 const WebKit::WebString& name, | 57 const WebKit::WebString& name, |
| 58 const WebKit::WebSecurityOrigin& origin); | 58 const WebKit::WebSecurityOrigin& origin); |
| 59 bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings); | 59 bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings); |
| 60 bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings); | 60 bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings); |
| 61 bool AllowScriptFromSource(WebKit::WebFrame* frame, bool enabled_per_settings, | 61 bool AllowScriptFromSource(WebKit::WebFrame* frame, bool enabled_per_settings, |
| 62 const WebKit::WebURL& script_url); | 62 const WebKit::WebURL& script_url); |
| 63 bool AllowStorage(WebKit::WebFrame* frame, bool local); | 63 bool AllowStorage(WebKit::WebFrame* frame, bool local); |
| 64 void DidNotAllowPlugins(WebKit::WebFrame* frame); | 64 void DidNotAllowPlugins(); |
| 65 void DidNotAllowScript(WebKit::WebFrame* frame); | 65 void DidNotAllowScript(); |
| 66 void DidNotAllowMixedScript(); |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes); | 69 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes); |
| 69 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, | 70 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, |
| 70 ContentSettingsInterstitialPages); | 71 ContentSettingsInterstitialPages); |
| 71 | 72 |
| 72 // RenderViewObserver implementation. | 73 // RenderViewObserver implementation. |
| 73 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 74 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 74 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, | 75 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, |
| 75 bool is_new_navigation) OVERRIDE; | 76 bool is_new_navigation) OVERRIDE; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 104 // Caches the result of |AllowScript|. | 105 // Caches the result of |AllowScript|. |
| 105 std::map<WebKit::WebFrame*, bool> cached_script_permissions_; | 106 std::map<WebKit::WebFrame*, bool> cached_script_permissions_; |
| 106 | 107 |
| 107 std::set<std::string> temporarily_allowed_plugins_; | 108 std::set<std::string> temporarily_allowed_plugins_; |
| 108 bool is_interstitial_page_; | 109 bool is_interstitial_page_; |
| 109 | 110 |
| 110 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); | 111 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 114 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
| OLD | NEW |