| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 const WebKit::WebScreenInfo& screen_info, | 232 const WebKit::WebScreenInfo& screen_info, |
| 233 content::old::GuestToEmbedderChannel* guest_to_embedder_channel, | 233 content::old::GuestToEmbedderChannel* guest_to_embedder_channel, |
| 234 AccessibilityMode accessibility_mode); | 234 AccessibilityMode accessibility_mode); |
| 235 | 235 |
| 236 // Returns the RenderViewImpl containing the given WebView. | 236 // Returns the RenderViewImpl containing the given WebView. |
| 237 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); | 237 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); |
| 238 | 238 |
| 239 // May return NULL when the view is closing. | 239 // May return NULL when the view is closing. |
| 240 CONTENT_EXPORT WebKit::WebView* webview() const; | 240 CONTENT_EXPORT WebKit::WebView* webview() const; |
| 241 | 241 |
| 242 // If this is a swapped out RenderView, which maintains a copy of the frame |
| 243 // tree of an active RenderView, we keep a map from frame ids in this view to |
| 244 // the frame ids of the active view for each corresponding frame. |
| 245 // This method returns the frame in this RenderView that corresponds to the |
| 246 // frame in the active RenderView specified by |remote_frame_id|. |
| 247 WebKit::WebFrame* GetFrameByRemoteID(int remote_frame_id); |
| 248 |
| 242 // WebGraphicsContext3DSwapBuffersClient implementation. | 249 // WebGraphicsContext3DSwapBuffersClient implementation. |
| 243 | 250 |
| 244 // Called by a GraphicsContext associated with this view when swapbuffers | 251 // Called by a GraphicsContext associated with this view when swapbuffers |
| 245 // is posted, completes or is aborted. | 252 // is posted, completes or is aborted. |
| 246 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; | 253 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; |
| 247 virtual void OnViewContextSwapBuffersComplete() OVERRIDE; | 254 virtual void OnViewContextSwapBuffersComplete() OVERRIDE; |
| 248 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; | 255 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; |
| 249 | 256 |
| 250 int history_list_offset() const { return history_list_offset_; } | 257 int history_list_offset() const { return history_list_offset_; } |
| 251 | 258 |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 // serialized form. | 1092 // serialized form. |
| 1086 // This is used when a frame is going to be removed from the tree. | 1093 // This is used when a frame is going to be removed from the tree. |
| 1087 void SendUpdatedFrameTree(WebKit::WebFrame* exclude_frame_subtree); | 1094 void SendUpdatedFrameTree(WebKit::WebFrame* exclude_frame_subtree); |
| 1088 | 1095 |
| 1089 // Recursively creates a DOM frame tree starting with |frame|, based on | 1096 // Recursively creates a DOM frame tree starting with |frame|, based on |
| 1090 // |frame_tree|. For each node, the frame is navigated to the swapped out URL, | 1097 // |frame_tree|. For each node, the frame is navigated to the swapped out URL, |
| 1091 // the name (if present) is set on it, and all the subframes are created | 1098 // the name (if present) is set on it, and all the subframes are created |
| 1092 // and added to the DOM. | 1099 // and added to the DOM. |
| 1093 void CreateFrameTree(WebKit::WebFrame* frame, DictionaryValue* frame_tree); | 1100 void CreateFrameTree(WebKit::WebFrame* frame, DictionaryValue* frame_tree); |
| 1094 | 1101 |
| 1095 // If this is a swapped out RenderView, which maintains a copy of the frame | |
| 1096 // tree of an active RenderView, we keep a map from frame ids in this view to | |
| 1097 // the frame ids of the active view for each corresponding frame. | |
| 1098 // This method returns the frame in this RenderView that corresponds to the | |
| 1099 // frame in the active RenderView specified by |remote_frame_id|. | |
| 1100 WebKit::WebFrame* GetFrameByRemoteID(int remote_frame_id); | |
| 1101 | |
| 1102 void EnsureMediaStreamImpl(); | 1102 void EnsureMediaStreamImpl(); |
| 1103 | 1103 |
| 1104 // This callback is triggered when DownloadFavicon completes, either | 1104 // This callback is triggered when DownloadFavicon completes, either |
| 1105 // succesfully or with a failure. See DownloadFavicon for more | 1105 // succesfully or with a failure. See DownloadFavicon for more |
| 1106 // details. | 1106 // details. |
| 1107 void DidDownloadFavicon(webkit_glue::ImageResourceFetcher* fetcher, | 1107 void DidDownloadFavicon(webkit_glue::ImageResourceFetcher* fetcher, |
| 1108 const SkBitmap& image); | 1108 const SkBitmap& image); |
| 1109 | 1109 |
| 1110 // Requests to download a favicon image. When done, the RenderView is notified | 1110 // Requests to download a favicon image. When done, the RenderView is notified |
| 1111 // by way of DidDownloadFavicon. Returns true if the request was successfully | 1111 // by way of DidDownloadFavicon. Returns true if the request was successfully |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 // bunch of stuff, you should probably create a helper class and put your | 1576 // bunch of stuff, you should probably create a helper class and put your |
| 1577 // data and methods on that to avoid bloating RenderView more. You can | 1577 // data and methods on that to avoid bloating RenderView more. You can |
| 1578 // use the Observer interface to filter IPC messages and receive frame change | 1578 // use the Observer interface to filter IPC messages and receive frame change |
| 1579 // notifications. | 1579 // notifications. |
| 1580 // --------------------------------------------------------------------------- | 1580 // --------------------------------------------------------------------------- |
| 1581 | 1581 |
| 1582 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1582 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1583 }; | 1583 }; |
| 1584 | 1584 |
| 1585 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1585 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |