| OLD | NEW |
| 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 26 matching lines...) Expand all Loading... |
| 37 const std::string& resource_identifier); | 37 const std::string& resource_identifier); |
| 38 | 38 |
| 39 // These correspond to WebKit::WebPermissionClient methods. | 39 // These correspond to WebKit::WebPermissionClient methods. |
| 40 bool AllowDatabase(WebKit::WebFrame* frame, | 40 bool AllowDatabase(WebKit::WebFrame* frame, |
| 41 const WebKit::WebString& name, | 41 const WebKit::WebString& name, |
| 42 const WebKit::WebString& display_name, | 42 const WebKit::WebString& display_name, |
| 43 unsigned long estimated_size); | 43 unsigned long estimated_size); |
| 44 bool AllowImages(WebKit::WebFrame* frame, bool enabled_per_settings); | 44 bool AllowImages(WebKit::WebFrame* frame, bool enabled_per_settings); |
| 45 bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings); | 45 bool AllowPlugins(WebKit::WebFrame* frame, bool enabled_per_settings); |
| 46 bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings); | 46 bool AllowScript(WebKit::WebFrame* frame, bool enabled_per_settings); |
| 47 bool AllowStorage(WebKit::WebFrame* frame, bool local); |
| 47 void DidNotAllowPlugins(WebKit::WebFrame* frame); | 48 void DidNotAllowPlugins(WebKit::WebFrame* frame); |
| 48 void DidNotAllowScript(WebKit::WebFrame* frame); | 49 void DidNotAllowScript(WebKit::WebFrame* frame); |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 // RenderViewObserver implementation. | 52 // RenderViewObserver implementation. |
| 52 virtual bool OnMessageReceived(const IPC::Message& message); | 53 virtual bool OnMessageReceived(const IPC::Message& message); |
| 53 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, | 54 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, |
| 54 bool is_new_navigation); | 55 bool is_new_navigation); |
| 55 | 56 |
| 56 // Message handlers. | 57 // Message handlers. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 71 // Stores if loading of images, scripts, and plugins is allowed. | 72 // Stores if loading of images, scripts, and plugins is allowed. |
| 72 ContentSettings current_content_settings_; | 73 ContentSettings current_content_settings_; |
| 73 | 74 |
| 74 // Stores if images, scripts, and plugins have actually been blocked. | 75 // Stores if images, scripts, and plugins have actually been blocked. |
| 75 bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES]; | 76 bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES]; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); | 78 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 81 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
| OLD | NEW |