Chromium Code Reviews| 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 given proxy. | |
|
nasko
2014/10/27 22:52:55
nit: s/the given proxy/the proxy identified by |pr
Nate Chapin
2014/10/28 19:59:20
Done.
| |
| 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 Loading... | |
| 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. | |
|
Charlie Reis
2014/10/28 16:38:29
Unfortunate that we have to store this. I suppose
Nate Chapin
2014/10/28 19:59:20
Done.
| |
| 679 int proxy_routing_id_; | |
| 680 | |
| 673 #if defined(ENABLE_PLUGINS) | 681 #if defined(ENABLE_PLUGINS) |
| 674 // Current text input composition text. Empty if no composition is in | 682 // Current text input composition text. Empty if no composition is in |
| 675 // progress. | 683 // progress. |
| 676 base::string16 pepper_composition_text_; | 684 base::string16 pepper_composition_text_; |
| 677 #endif | 685 #endif |
| 678 | 686 |
| 679 RendererWebCookieJarImpl cookie_jar_; | 687 RendererWebCookieJarImpl cookie_jar_; |
| 680 | 688 |
| 681 // All the registered observers. | 689 // All the registered observers. |
| 682 ObserverList<RenderFrameObserver> observers_; | 690 ObserverList<RenderFrameObserver> observers_; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 780 #endif | 788 #endif |
| 781 | 789 |
| 782 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 790 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 783 | 791 |
| 784 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 792 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 785 }; | 793 }; |
| 786 | 794 |
| 787 } // namespace content | 795 } // namespace content |
| 788 | 796 |
| 789 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 797 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |