Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1223)

Side by Side Diff: chrome/renderer/content_settings_observer.h

Issue 8889008: Revert 113579 - Content settings: allow scripts on interstitial pages even if JavaScript is blocked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const WebKit::WebString& name, 58 const WebKit::WebString& name,
59 const WebKit::WebSecurityOrigin& origin); 59 const WebKit::WebSecurityOrigin& origin);
60 bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings); 60 bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings);
61 bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings); 61 bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings);
62 bool AllowScriptFromSource(WebKit::WebFrame* frame, bool enabled_per_settings, 62 bool AllowScriptFromSource(WebKit::WebFrame* frame, bool enabled_per_settings,
63 const WebKit::WebURL& script_url); 63 const WebKit::WebURL& script_url);
64 bool AllowStorage(WebKit::WebFrame* frame, bool local); 64 bool AllowStorage(WebKit::WebFrame* frame, bool local);
65 void DidNotAllowPlugins(WebKit::WebFrame* frame); 65 void DidNotAllowPlugins(WebKit::WebFrame* frame);
66 void DidNotAllowScript(WebKit::WebFrame* frame); 66 void DidNotAllowScript(WebKit::WebFrame* frame);
67 67
68 // Used for allowing scripts and images on views displaying interstitial
69 // pages.
70 void SetAsInterstitial();
71
72 private: 68 private:
73 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes); 69 FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes);
74 70
75 // RenderViewObserver implementation. 71 // RenderViewObserver implementation.
76 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 72 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
77 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, 73 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame,
78 bool is_new_navigation) OVERRIDE; 74 bool is_new_navigation) OVERRIDE;
79 75
80 // Message handlers. 76 // Message handlers.
81 void OnLoadBlockedPlugins(); 77 void OnLoadBlockedPlugins();
(...skipping 18 matching lines...) Expand all
100 bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES]; 96 bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES];
101 97
102 // Caches the result of AllowStorage. 98 // Caches the result of AllowStorage.
103 typedef std::pair<GURL, bool> StoragePermissionsKey; 99 typedef std::pair<GURL, bool> StoragePermissionsKey;
104 std::map<StoragePermissionsKey, bool> cached_storage_permissions_; 100 std::map<StoragePermissionsKey, bool> cached_storage_permissions_;
105 101
106 // Caches the result of |AllowScript|. 102 // Caches the result of |AllowScript|.
107 std::map<WebKit::WebFrame*, bool> cached_script_permissions_; 103 std::map<WebKit::WebFrame*, bool> cached_script_permissions_;
108 104
109 bool plugins_temporarily_allowed_; 105 bool plugins_temporarily_allowed_;
110 bool is_interstitial_page_;
111 106
112 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); 107 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver);
113 }; 108 };
114 109
115 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 110 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.cc ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698