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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // This is used for cases when the NPAPI plugins malfunction if used. | 93 // This is used for cases when the NPAPI plugins malfunction if used. |
94 bool AreNPAPIPluginsBlocked() const; | 94 bool AreNPAPIPluginsBlocked() const; |
95 | 95 |
96 private: | 96 private: |
97 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes); | 97 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes); |
98 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, | 98 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, |
99 ContentSettingsInterstitialPages); | 99 ContentSettingsInterstitialPages); |
100 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, PluginsTemporarilyAllowed); | 100 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, PluginsTemporarilyAllowed); |
101 | 101 |
102 // RenderFrameObserver implementation. | 102 // RenderFrameObserver implementation. |
103 virtual void WebFrameCreated(blink::WebFrame* frame) OVERRIDE; | |
104 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 103 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
105 virtual void DidCommitProvisionalLoad(blink::WebFrame* frame, | 104 virtual void DidCommitProvisionalLoad(blink::WebFrame* frame, |
106 bool is_new_navigation) OVERRIDE; | 105 bool is_new_navigation) OVERRIDE; |
107 | 106 |
108 // Message handlers. | 107 // Message handlers. |
109 void OnLoadBlockedPlugins(const std::string& identifier); | 108 void OnLoadBlockedPlugins(const std::string& identifier); |
110 void OnSetAsInterstitial(); | 109 void OnSetAsInterstitial(); |
111 void OnNPAPINotSupported(); | 110 void OnNPAPINotSupported(); |
112 void OnSetAllowDisplayingInsecureContent(bool allow); | 111 void OnSetAllowDisplayingInsecureContent(bool allow); |
113 void OnSetAllowRunningInsecureContent(bool allow); | 112 void OnSetAllowRunningInsecureContent(bool allow); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 std::map<blink::WebFrame*, bool> cached_script_permissions_; | 151 std::map<blink::WebFrame*, bool> cached_script_permissions_; |
153 | 152 |
154 std::set<std::string> temporarily_allowed_plugins_; | 153 std::set<std::string> temporarily_allowed_plugins_; |
155 bool is_interstitial_page_; | 154 bool is_interstitial_page_; |
156 bool npapi_plugins_blocked_; | 155 bool npapi_plugins_blocked_; |
157 | 156 |
158 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); | 157 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); |
159 }; | 158 }; |
160 | 159 |
161 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 160 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
OLD | NEW |