| 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 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void OnStartFrameSniffer(const string16& frame_name); | 139 void OnStartFrameSniffer(const string16& frame_name); |
| 140 void OnGetFPS(); | 140 void OnGetFPS(); |
| 141 void OnAddStrictSecurityHost(const std::string& host); | 141 void OnAddStrictSecurityHost(const std::string& host); |
| 142 void OnNPAPINotSupported(); | 142 void OnNPAPINotSupported(); |
| 143 #if defined(OS_ANDROID) | 143 #if defined(OS_ANDROID) |
| 144 void OnUpdateTopControlsState(content::TopControlsState constraints, | 144 void OnUpdateTopControlsState(content::TopControlsState constraints, |
| 145 content::TopControlsState current, | 145 content::TopControlsState current, |
| 146 bool animate); | 146 bool animate); |
| 147 #endif | 147 #endif |
| 148 | 148 |
| 149 void CapturePageInfoLater(bool preliminary_capture, base::TimeDelta delay); | 149 void CapturePageInfoLater(int page_id, |
| 150 bool preliminary_capture, |
| 151 base::TimeDelta delay); |
| 150 | 152 |
| 151 // Captures the thumbnail and text contents for indexing for the given load | 153 // Captures the thumbnail and text contents for indexing for the given load |
| 152 // ID. Kicks off analysis of the captured text. | 154 // ID. Kicks off analysis of the captured text. |
| 153 void CapturePageInfo(bool preliminary_capture); | 155 void CapturePageInfo(int page_id, bool preliminary_capture); |
| 154 | 156 |
| 155 // Retrieves the text from the given frame contents, the page text up to the | 157 // Retrieves the text from the given frame contents, the page text up to the |
| 156 // maximum amount kMaxIndexChars will be placed into the given buffer. | 158 // maximum amount kMaxIndexChars will be placed into the given buffer. |
| 157 void CaptureText(WebKit::WebFrame* frame, string16* contents); | 159 void CaptureText(WebKit::WebFrame* frame, string16* contents); |
| 158 | 160 |
| 159 ExternalHostBindings* GetExternalHostBindings(); | 161 ExternalHostBindings* GetExternalHostBindings(); |
| 160 | 162 |
| 161 // Determines if a host is in the strict security host set. | 163 // Determines if a host is in the strict security host set. |
| 162 bool IsStrictSecurityHost(const std::string& host); | 164 bool IsStrictSecurityHost(const std::string& host); |
| 163 | 165 |
| 164 // If |origin| corresponds to an installed extension, returns that extension. | 166 // If |origin| corresponds to an installed extension, returns that extension. |
| 165 // Otherwise returns NULL. | 167 // Otherwise returns NULL. |
| 166 const extensions::Extension* GetExtension( | 168 const extensions::Extension* GetExtension( |
| 167 const WebKit::WebSecurityOrigin& origin) const; | 169 const WebKit::WebSecurityOrigin& origin) const; |
| 168 | 170 |
| 171 // Checks if a page contains <meta http-equiv="refresh" ...> tag. |
| 172 bool HasRefreshMetaTag(WebKit::WebFrame* frame); |
| 173 |
| 169 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. | 174 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. |
| 170 scoped_ptr<WebUIJavaScript> webui_javascript_; | 175 scoped_ptr<WebUIJavaScript> webui_javascript_; |
| 171 | 176 |
| 172 // Owned by ChromeContentRendererClient and outlive us. | 177 // Owned by ChromeContentRendererClient and outlive us. |
| 173 ChromeRenderProcessObserver* chrome_render_process_observer_; | 178 ChromeRenderProcessObserver* chrome_render_process_observer_; |
| 174 extensions::Dispatcher* extension_dispatcher_; | 179 extensions::Dispatcher* extension_dispatcher_; |
| 175 | 180 |
| 176 // Have the same lifetime as us. | 181 // Have the same lifetime as us. |
| 177 ContentSettingsObserver* content_settings_; | 182 ContentSettingsObserver* content_settings_; |
| 178 TranslateHelper* translate_helper_; | 183 TranslateHelper* translate_helper_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 197 // A color page overlay when visually de-emaphasized. | 202 // A color page overlay when visually de-emaphasized. |
| 198 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; | 203 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; |
| 199 | 204 |
| 200 // Used to delay calling CapturePageInfo. | 205 // Used to delay calling CapturePageInfo. |
| 201 base::Timer capture_timer_; | 206 base::Timer capture_timer_; |
| 202 | 207 |
| 203 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); | 208 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); |
| 204 }; | 209 }; |
| 205 | 210 |
| 206 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 211 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |