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

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 600553003: Enable swapping a frame back in to its parent process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remoteToLocal
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Creates a new RenderFrame. |render_view| is the RenderView object that this 97 // Creates a new RenderFrame. |render_view| is the RenderView object that this
98 // frame belongs to. 98 // frame belongs to.
99 // Callers *must* call |SetWebFrame| immediately after creation. 99 // Callers *must* call |SetWebFrame| immediately after creation.
100 // Note: This is called only when RenderFrame is created by Blink through 100 // Note: This is called only when RenderFrame is created by Blink through
101 // createChildFrame. 101 // createChildFrame.
102 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. 102 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed.
103 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); 103 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id);
104 104
105 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame 105 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame
106 // identified by |parent_routing_id| or as the top-level frame if the latter 106 // identified by |parent_routing_id| or as the top-level frame if the latter
107 // is MSG_ROUTING_NONE. It creates the Blink WebLocalFrame and inserts it in 107 // is MSG_ROUTING_NONE. If proxy_routing_id is MSG_ROUTING_NONE, it creates
nasko 2014/10/28 21:58:15 nit: || around proxy_routing_id.
Nate Chapin 2014/10/30 19:00:51 Done.
108 // the proper place in the frame tree. 108 // the Blink WebLocalFrame and inserts it in the proper place in the frame
109 // tree. Otherwise, the frame is semi-orphaned until it commits, at which
110 // point it replaces the proxy identified by |proxy_routing_id|.
109 // Note: This is called only when RenderFrame is being created in response to 111 // Note: This is called only when RenderFrame is being created in response to
110 // IPC message from the browser process. All other frame creation is driven 112 // IPC message from the browser process. All other frame creation is driven
111 // through Blink and Create. 113 // through Blink and Create.
112 static void CreateFrame(int routing_id, int parent_routing_id); 114 static void CreateFrame(int routing_id,
115 int parent_routing_id,
116 int proxy_routing_id);
113 117
114 // Returns the RenderFrameImpl for the given routing ID. 118 // Returns the RenderFrameImpl for the given routing ID.
115 static RenderFrameImpl* FromRoutingID(int routing_id); 119 static RenderFrameImpl* FromRoutingID(int routing_id);
116 120
117 // Just like RenderFrame::FromWebFrame but returns the implementation. 121 // Just like RenderFrame::FromWebFrame but returns the implementation.
118 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); 122 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame);
119 123
120 // Used by content_layouttest_support to hook into the creation of 124 // Used by content_layouttest_support to hook into the creation of
121 // RenderFrameImpls. 125 // RenderFrameImpls.
122 static void InstallCreateHook( 126 static void InstallCreateHook(
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 667
664 base::WeakPtr<RenderViewImpl> render_view_; 668 base::WeakPtr<RenderViewImpl> render_view_;
665 int routing_id_; 669 int routing_id_;
666 bool is_swapped_out_; 670 bool is_swapped_out_;
667 // RenderFrameProxy exists only when is_swapped_out_ is true. 671 // RenderFrameProxy exists only when is_swapped_out_ is true.
668 // TODO(nasko): This can be removed once we don't have a swapped out state on 672 // TODO(nasko): This can be removed once we don't have a swapped out state on
669 // RenderFrame. See https://crbug.com/357747. 673 // RenderFrame. See https://crbug.com/357747.
670 RenderFrameProxy* render_frame_proxy_; 674 RenderFrameProxy* render_frame_proxy_;
671 bool is_detaching_; 675 bool is_detaching_;
672 676
677 // If this frame was created to replace a proxy, this will store the routing
678 // id of the proxy to replace at commit-time, at which time it will be
679 // cleared.
680 int proxy_routing_id_;
681
673 #if defined(ENABLE_PLUGINS) 682 #if defined(ENABLE_PLUGINS)
674 // Current text input composition text. Empty if no composition is in 683 // Current text input composition text. Empty if no composition is in
675 // progress. 684 // progress.
676 base::string16 pepper_composition_text_; 685 base::string16 pepper_composition_text_;
677 #endif 686 #endif
678 687
679 RendererWebCookieJarImpl cookie_jar_; 688 RendererWebCookieJarImpl cookie_jar_;
680 689
681 // All the registered observers. 690 // All the registered observers.
682 ObserverList<RenderFrameObserver> observers_; 691 ObserverList<RenderFrameObserver> observers_;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 #endif 789 #endif
781 790
782 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 791 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
783 792
784 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 793 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
785 }; 794 };
786 795
787 } // namespace content 796 } // namespace content
788 797
789 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 798 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698