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