| 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_CHROME_RENDER_VIEW_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
| 6 #define CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 6 #define CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 int extension_group) OVERRIDE; | 97 int extension_group) OVERRIDE; |
| 98 virtual bool allowScriptExtension(WebKit::WebFrame* frame, | 98 virtual bool allowScriptExtension(WebKit::WebFrame* frame, |
| 99 const WebKit::WebString& extension_name, | 99 const WebKit::WebString& extension_name, |
| 100 int extension_group, | 100 int extension_group, |
| 101 int world_id); | 101 int world_id); |
| 102 virtual bool allowStorage(WebKit::WebFrame* frame, bool local) OVERRIDE; | 102 virtual bool allowStorage(WebKit::WebFrame* frame, bool local) OVERRIDE; |
| 103 virtual bool allowReadFromClipboard(WebKit::WebFrame* frame, | 103 virtual bool allowReadFromClipboard(WebKit::WebFrame* frame, |
| 104 bool default_value) OVERRIDE; | 104 bool default_value) OVERRIDE; |
| 105 virtual bool allowWriteToClipboard(WebKit::WebFrame* frame, | 105 virtual bool allowWriteToClipboard(WebKit::WebFrame* frame, |
| 106 bool default_value) OVERRIDE; | 106 bool default_value) OVERRIDE; |
| 107 virtual bool allowWebComponents(const WebKit::WebDocument&, bool) OVERRIDE; |
| 107 virtual void didNotAllowPlugins(WebKit::WebFrame* frame) OVERRIDE; | 108 virtual void didNotAllowPlugins(WebKit::WebFrame* frame) OVERRIDE; |
| 108 virtual void didNotAllowScript(WebKit::WebFrame* frame) OVERRIDE; | 109 virtual void didNotAllowScript(WebKit::WebFrame* frame) OVERRIDE; |
| 109 virtual bool allowDisplayingInsecureContent( | 110 virtual bool allowDisplayingInsecureContent( |
| 110 WebKit::WebFrame* frame, | 111 WebKit::WebFrame* frame, |
| 111 bool allowed_per_settings, | 112 bool allowed_per_settings, |
| 112 const WebKit::WebSecurityOrigin& context, | 113 const WebKit::WebSecurityOrigin& context, |
| 113 const WebKit::WebURL& url) OVERRIDE; | 114 const WebKit::WebURL& url) OVERRIDE; |
| 114 virtual bool allowRunningInsecureContent( | 115 virtual bool allowRunningInsecureContent( |
| 115 WebKit::WebFrame* frame, | 116 WebKit::WebFrame* frame, |
| 116 bool allowed_per_settings, | 117 bool allowed_per_settings, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // frame whose size is image_size is returned. If the image doesn't | 176 // frame whose size is image_size is returned. If the image doesn't |
| 176 // have a frame at the specified size, the first is returned. | 177 // have a frame at the specified size, the first is returned. |
| 177 bool DownloadFavicon(int id, const GURL& image_url, int image_size); | 178 bool DownloadFavicon(int id, const GURL& image_url, int image_size); |
| 178 | 179 |
| 179 // Decodes a data: URL image or returns an empty image in case of failure. | 180 // Decodes a data: URL image or returns an empty image in case of failure. |
| 180 SkBitmap ImageFromDataUrl(const GURL&) const; | 181 SkBitmap ImageFromDataUrl(const GURL&) const; |
| 181 | 182 |
| 182 // Determines if a host is in the strict security host set. | 183 // Determines if a host is in the strict security host set. |
| 183 bool IsStrictSecurityHost(const std::string& host); | 184 bool IsStrictSecurityHost(const std::string& host); |
| 184 | 185 |
| 186 // Determines if the document has a permission to use experimental Web API |
| 187 bool IsExperimentalWebFeatureAllowed(const WebKit::WebDocument& document); |
| 188 |
| 185 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. | 189 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. |
| 186 scoped_ptr<WebUIJavaScript> webui_javascript_; | 190 scoped_ptr<WebUIJavaScript> webui_javascript_; |
| 187 | 191 |
| 188 // Owned by ChromeContentRendererClient and outlive us. | 192 // Owned by ChromeContentRendererClient and outlive us. |
| 189 ChromeRenderProcessObserver* chrome_render_process_observer_; | 193 ChromeRenderProcessObserver* chrome_render_process_observer_; |
| 190 ExtensionDispatcher* extension_dispatcher_; | 194 ExtensionDispatcher* extension_dispatcher_; |
| 191 | 195 |
| 192 // Have the same lifetime as us. | 196 // Have the same lifetime as us. |
| 193 ContentSettingsObserver* content_settings_; | 197 ContentSettingsObserver* content_settings_; |
| 194 TranslateHelper* translate_helper_; | 198 TranslateHelper* translate_helper_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 220 // A color page overlay when visually de-emaphasized. | 224 // A color page overlay when visually de-emaphasized. |
| 221 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; | 225 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; |
| 222 | 226 |
| 223 // Used to delay calling CapturePageInfo. | 227 // Used to delay calling CapturePageInfo. |
| 224 base::Timer capture_timer_; | 228 base::Timer capture_timer_; |
| 225 | 229 |
| 226 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); | 230 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); |
| 227 }; | 231 }; |
| 228 | 232 |
| 229 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 233 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |