Chromium Code Reviews| Index: content/renderer/render_view_impl.h |
| diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h |
| index 04490b93e27b795c3d976fd89974f0a4f0e75040..0fab6d3497c6811c6c9515a03971c80f7691c767 100644 |
| --- a/content/renderer/render_view_impl.h |
| +++ b/content/renderer/render_view_impl.h |
| @@ -18,6 +18,7 @@ |
| #include "base/memory/weak_ptr.h" |
| #include "base/observer_list.h" |
| #include "base/timer.h" |
| +#include "base/values.h" |
| #include "build/build_config.h" |
| #include "content/common/content_export.h" |
| #include "content/common/edit_command.h" |
| @@ -527,6 +528,8 @@ class RenderViewImpl : public RenderWidget, |
| WebKit::WebFrame* frame, |
| WebKit::WebApplicationCacheHostClient* client); |
| virtual WebKit::WebCookieJar* cookieJar(WebKit::WebFrame* frame); |
| + virtual void didCreateFrame(WebKit::WebFrame* parent, |
| + WebKit::WebFrame* child); |
| virtual void frameDetached(WebKit::WebFrame* frame); |
| virtual void willClose(WebKit::WebFrame* frame); |
| virtual void loadURLExternally(WebKit::WebFrame* frame, |
| @@ -665,7 +668,8 @@ class RenderViewImpl : public RenderWidget, |
| virtual void willOpenSocketStream( |
| WebKit::WebSocketStreamHandle* handle); |
| virtual bool willCheckAndDispatchMessageEvent( |
| - WebKit::WebFrame* source, |
| + WebKit::WebFrame* sourceFrame, |
| + WebKit::WebFrame* targetFrame, |
| WebKit::WebSecurityOrigin targetOrigin, |
| WebKit::WebDOMMessageEvent event) OVERRIDE; |
| virtual WebKit::WebString userAgentOverride( |
| @@ -1027,6 +1031,10 @@ class RenderViewImpl : public RenderWidget, |
| void OnJavaBridgeInit(); |
| + void OnUpdatedFrameTree(int process_id, |
| + int route_id, |
| + const std::string& frame_tree); |
| + |
| // Adding a new message handler? Please add it in alphabetical order above |
| // and put it in the same position in the .cc file. |
| @@ -1044,6 +1052,15 @@ class RenderViewImpl : public RenderWidget, |
| WebKit::WebGraphicsContext3D* CreateGraphicsContext3D( |
| const WebKit::WebGraphicsContext3D::Attributes& attributes); |
| + // This method walks the entire frame tree for the |frame| specified and |
| + // sends an update to the browser process as described in the |
| + // ViewHostMsg_FrameTreeUpdated comments. |
| + void SendUpdatedFrameTree(WebKit::WebFrame* frame, bool exclude); |
|
Charlie Reis
2012/08/22 22:08:34
What's |exclude| about?
nasko
2012/08/23 21:55:53
Done.
|
| + |
| + // Walks the frame hierarchy and returns the frame which corresponds to the |
| + // |remote_frame_id|. |
|
Charlie Reis
2012/08/22 22:08:34
I don't understand what remote_frame_id is referri
nasko
2012/08/23 21:55:53
I've renamed it from Remote to Mapped. The idea of
|
| + WebKit::WebFrame* GetFrameByRemoteID(int remote_frame_id); |
| + |
| void EnsureMediaStreamImpl(); |
| // This callback is triggered when DownloadFavicon completes, either |
| @@ -1087,7 +1104,8 @@ class RenderViewImpl : public RenderWidget, |
| bool replace); |
| // Make this RenderView show an empty, unscriptable page. |
|
Charlie Reis
2012/08/22 22:08:34
Please update the comment for what the parameters
nasko
2012/08/23 21:55:53
Done.
|
| - void NavigateToSwappedOutURL(); |
| + void NavigateToSwappedOutURL(WebKit::WebFrame* frame, |
| + DictionaryValue* frame_tree); |
| // If we initiated a navigation, this function will populate |document_state| |
| // with the navigation information saved in OnNavigate(). |
| @@ -1438,6 +1456,25 @@ class RenderViewImpl : public RenderWidget, |
| // before the guest_to_embedder_channel was ready. |
| WebKit::WebGraphicsContext3D::Attributes guest_attributes_; |
| + // Boolean indicating whether we are in the process of updating the frame |
| + // tree for this renderer. If true, we won't be sending frame tree updates |
|
Charlie Reis
2012/08/22 22:08:34
nit: renderer -> RenderView.
"Updating the frame
nasko
2012/08/23 21:55:53
Done.
|
| + // back to the browser. |
| + bool updating_frame_tree_; |
| + |
| + // Boolean indicating that the frame tree has changed, but message has not |
|
Charlie Reis
2012/08/22 22:08:34
nit: a message
nasko
2012/08/23 21:55:53
Done.
|
| + // been sent to the browser because a resource has been loading. |
|
Charlie Reis
2012/08/22 22:08:34
Why does a loading resource block us?
nasko
2012/08/23 21:55:53
Loading a resource doesn't block us. This is to av
|
| + bool pending_frame_tree_update_; |
| + |
| + // If this render view is swapped out mirror of an active render view in a |
|
Charlie Reis
2012/08/22 22:08:34
nit: is the swapped out "mirror"
nasko
2012/08/23 21:55:53
Done.
|
| + // different process, we record the process id and route id for the active RV. |
| + // For further details, see the comments on ViewHostMsg_FrameTreeUpdated. |
| + int target_process_id_; |
| + int target_routing_id_; |
| + |
| + // A mapping of current process frame ids to ids in the remote active render |
|
Charlie Reis
2012/08/22 22:08:34
nit: A map of the current process's
nasko
2012/08/23 21:55:53
Done.
|
| + // view, if this is a swapped out mirror render view. |
|
Charlie Reis
2012/08/22 22:08:34
nit: We don't need to say mirror here.
nasko
2012/08/23 21:55:53
Done.
|
| + std::map<int, int> frames_map_; |
|
Charlie Reis
2012/08/22 22:08:34
This name could be more descriptive. active_frame
nasko
2012/08/23 21:55:53
Done.
|
| + |
| // NOTE: pepper_delegate_ should be last member because its constructor calls |
| // AddObservers method of RenderViewImpl from c-tor. |
| content::PepperPluginDelegateImpl pepper_delegate_; |