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

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
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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 668
665 base::WeakPtr<RenderViewImpl> render_view_; 669 base::WeakPtr<RenderViewImpl> render_view_;
666 int routing_id_; 670 int routing_id_;
667 bool is_swapped_out_; 671 bool is_swapped_out_;
668 // RenderFrameProxy exists only when is_swapped_out_ is true. 672 // RenderFrameProxy exists only when is_swapped_out_ is true.
669 // TODO(nasko): This can be removed once we don't have a swapped out state on 673 // TODO(nasko): This can be removed once we don't have a swapped out state on
670 // RenderFrame. See https://crbug.com/357747. 674 // RenderFrame. See https://crbug.com/357747.
671 RenderFrameProxy* render_frame_proxy_; 675 RenderFrameProxy* render_frame_proxy_;
672 bool is_detaching_; 676 bool is_detaching_;
673 677
678 // If this frame was created to replace a proxy, this will store the routing
679 // id of the proxy to replace at commit-time, at which time it will be
680 // cleared.
681 int proxy_routing_id_;
Charlie Reis 2014/10/30 19:36:06 Let's put a "TODO(creis): Remove this after switch
Nate Chapin 2014/10/30 23:12:29 Done.
682
674 #if defined(ENABLE_PLUGINS) 683 #if defined(ENABLE_PLUGINS)
675 // Current text input composition text. Empty if no composition is in 684 // Current text input composition text. Empty if no composition is in
676 // progress. 685 // progress.
677 base::string16 pepper_composition_text_; 686 base::string16 pepper_composition_text_;
678 #endif 687 #endif
679 688
680 RendererWebCookieJarImpl cookie_jar_; 689 RendererWebCookieJarImpl cookie_jar_;
681 690
682 // All the registered observers. 691 // All the registered observers.
683 ObserverList<RenderFrameObserver> observers_; 692 ObserverList<RenderFrameObserver> observers_;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 #endif 790 #endif
782 791
783 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 792 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
784 793
785 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 794 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
786 }; 795 };
787 796
788 } // namespace content 797 } // namespace content
789 798
790 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 799 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698