| 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 CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // RenderViewImpls. | 194 // RenderViewImpls. |
| 195 static void InstallCreateHook( | 195 static void InstallCreateHook( |
| 196 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); | 196 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); |
| 197 | 197 |
| 198 // Returns the RenderViewImpl containing the given WebView. | 198 // Returns the RenderViewImpl containing the given WebView. |
| 199 static RenderViewImpl* FromWebView(blink::WebView* webview); | 199 static RenderViewImpl* FromWebView(blink::WebView* webview); |
| 200 | 200 |
| 201 // Returns the RenderViewImpl for the given routing ID. | 201 // Returns the RenderViewImpl for the given routing ID. |
| 202 static RenderViewImpl* FromRoutingID(int routing_id); | 202 static RenderViewImpl* FromRoutingID(int routing_id); |
| 203 | 203 |
| 204 static size_t GetRenderViewCount(); |
| 205 |
| 204 // May return NULL when the view is closing. | 206 // May return NULL when the view is closing. |
| 205 blink::WebView* webview() const; | 207 blink::WebView* webview() const; |
| 206 | 208 |
| 207 int history_list_offset() const { return history_list_offset_; } | 209 int history_list_offset() const { return history_list_offset_; } |
| 208 | 210 |
| 209 const WebPreferences& webkit_preferences() const { | 211 const WebPreferences& webkit_preferences() const { |
| 210 return webkit_preferences_; | 212 return webkit_preferences_; |
| 211 } | 213 } |
| 212 | 214 |
| 213 const RendererPreferences& renderer_preferences() const { | 215 const RendererPreferences& renderer_preferences() const { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 #endif | 270 #endif |
| 269 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 271 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 270 void DidHideExternalPopupMenu(); | 272 void DidHideExternalPopupMenu(); |
| 271 #endif | 273 #endif |
| 272 | 274 |
| 273 bool is_loading() const { return frames_in_progress_ != 0; } | 275 bool is_loading() const { return frames_in_progress_ != 0; } |
| 274 | 276 |
| 275 void FrameDidStartLoading(blink::WebFrame* frame); | 277 void FrameDidStartLoading(blink::WebFrame* frame); |
| 276 void FrameDidStopLoading(blink::WebFrame* frame); | 278 void FrameDidStopLoading(blink::WebFrame* frame); |
| 277 | 279 |
| 278 void FrameDidCommitProvisionalLoad(blink::WebLocalFrame* frame, | |
| 279 bool is_new_navigation); | |
| 280 | |
| 281 // Plugin-related functions -------------------------------------------------- | 280 // Plugin-related functions -------------------------------------------------- |
| 282 | 281 |
| 283 #if defined(ENABLE_PLUGINS) | 282 #if defined(ENABLE_PLUGINS) |
| 284 // Get/set the plugin which will be used as to handle document find requests. | 283 // Get/set the plugin which will be used as to handle document find requests. |
| 285 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { | 284 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { |
| 286 plugin_find_handler_ = plugin; | 285 plugin_find_handler_ = plugin; |
| 287 } | 286 } |
| 288 PepperPluginInstanceImpl* plugin_find_handler() { | 287 PepperPluginInstanceImpl* plugin_find_handler() { |
| 289 return plugin_find_handler_; | 288 return plugin_find_handler_; |
| 290 } | 289 } |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 const SkBitmap& image); | 788 const SkBitmap& image); |
| 790 | 789 |
| 791 // Requests to download a favicon image. When done, the RenderView is notified | 790 // Requests to download a favicon image. When done, the RenderView is notified |
| 792 // by way of DidDownloadFavicon. Returns true if the request was successfully | 791 // by way of DidDownloadFavicon. Returns true if the request was successfully |
| 793 // started, false otherwise. id is used to uniquely identify the request and | 792 // started, false otherwise. id is used to uniquely identify the request and |
| 794 // passed back to the DidDownloadFavicon method. If the image has multiple | 793 // passed back to the DidDownloadFavicon method. If the image has multiple |
| 795 // frames, the frame whose size is image_size is returned. If the image | 794 // frames, the frame whose size is image_size is returned. If the image |
| 796 // doesn't have a frame at the specified size, the first is returned. | 795 // doesn't have a frame at the specified size, the first is returned. |
| 797 bool DownloadFavicon(int id, const GURL& image_url, int image_size); | 796 bool DownloadFavicon(int id, const GURL& image_url, int image_size); |
| 798 | 797 |
| 799 // Returns the URL being loaded by the given frame's request. | |
| 800 GURL GetLoadingUrl(blink::WebFrame* frame) const; | |
| 801 | |
| 802 // Called to get the WebPlugin to handle find requests in the document. | 798 // Called to get the WebPlugin to handle find requests in the document. |
| 803 // Returns NULL if there is no such WebPlugin. | 799 // Returns NULL if there is no such WebPlugin. |
| 804 blink::WebPlugin* GetWebPluginForFind(); | 800 blink::WebPlugin* GetWebPluginForFind(); |
| 805 | 801 |
| 806 // Returns true if the |params| navigation is to an entry that has been | 802 // Returns true if the |params| navigation is to an entry that has been |
| 807 // cropped due to a recent navigation the browser did not know about. | 803 // cropped due to a recent navigation the browser did not know about. |
| 808 bool IsBackForwardToStaleEntry(const FrameMsg_Navigate_Params& params, | 804 bool IsBackForwardToStaleEntry(const FrameMsg_Navigate_Params& params, |
| 809 bool is_reload); | 805 bool is_reload); |
| 810 | 806 |
| 811 // TODO(nasko): Remove this method when code is migrated to use | 807 // TODO(nasko): Remove this method when code is migrated to use |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 // use the Observer interface to filter IPC messages and receive frame change | 1180 // use the Observer interface to filter IPC messages and receive frame change |
| 1185 // notifications. | 1181 // notifications. |
| 1186 // --------------------------------------------------------------------------- | 1182 // --------------------------------------------------------------------------- |
| 1187 | 1183 |
| 1188 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1184 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1189 }; | 1185 }; |
| 1190 | 1186 |
| 1191 } // namespace content | 1187 } // namespace content |
| 1192 | 1188 |
| 1193 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1189 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |