Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: content/browser/renderer_host/render_view_host_impl.h

Issue 10827078: Support frame tree propagation between renderers in the same browsing instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on Albert's comments and added explicit test for adding/removing frames using JavaScrip… Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host_impl.h
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index af0d5d2dd7dc203cdeed00a440deecf2007ab253..4acdd4a018a88fa483c90dcddd050100175d64cb 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -209,6 +209,7 @@ class CONTENT_EXPORT RenderViewHostImpl
const CustomContextMenuContext& context) OVERRIDE;
virtual void NotifyMoveOrResizeStarted() OVERRIDE;
virtual void ReloadFrame() OVERRIDE;
+ virtual const std::string& GetFrameTree() const OVERRIDE;
virtual void SetAltErrorPageURL(const GURL& url) OVERRIDE;
virtual void SetWebUIProperty(const std::string& name,
const std::string& value) OVERRIDE;
@@ -393,6 +394,12 @@ class CONTENT_EXPORT RenderViewHostImpl
// User rotated the screen. Calls the "onorientationchange" Javascript hook.
void SendOrientationChangeEvent(int orientation);
+ // Updates the frame tree for this RVH and sends an IPC down to the renderer
+ // process to keep them in sync.
+ void UpdateFrameTree(int process_id,
+ int route_id,
+ const std::string& frame_tree);
+
void set_save_accessibility_tree_for_testing(bool save) {
save_accessibility_tree_for_testing_ = save;
}
@@ -542,6 +549,7 @@ class CONTENT_EXPORT RenderViewHostImpl
void OnRunFileChooser(const FileChooserParams& params);
void OnDomOperationResponse(const std::string& json_string,
int automation_id);
+ void OnFrameTree(const std::string& frame_tree);
#if defined(OS_MACOSX) || defined(OS_ANDROID)
void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params);
@@ -637,6 +645,10 @@ class CONTENT_EXPORT RenderViewHostImpl
// for unit testing.
bool send_accessibility_updated_notifications_;
+ // A JSON serialized representation of the frame tree for the current document
+ // in the render view.
+ std::string frame_tree_;
+
// The most recently received accessibility tree - for unit testing only.
AccessibilityNodeData accessibility_tree_;

Powered by Google App Engine
This is Rietveld 408576698