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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 class WebGeolocationClient; | 58 class WebGeolocationClient; |
| 59 class WebMouseEvent; | 59 class WebMouseEvent; |
| 60 class WebContentDecryptionModule; | 60 class WebContentDecryptionModule; |
| 61 class WebMediaPlayer; | 61 class WebMediaPlayer; |
| 62 class WebPresentationClient; | 62 class WebPresentationClient; |
| 63 class WebPushClient; | 63 class WebPushClient; |
| 64 class WebSecurityOrigin; | 64 class WebSecurityOrigin; |
| 65 struct WebCompositionUnderline; | 65 struct WebCompositionUnderline; |
| 66 struct WebContextMenuData; | 66 struct WebContextMenuData; |
| 67 struct WebCursorInfo; | 67 struct WebCursorInfo; |
| 68 struct WebScreenInfo; | |
| 68 } | 69 } |
| 69 | 70 |
| 70 namespace gfx { | 71 namespace gfx { |
| 71 class Point; | 72 class Point; |
| 72 class Range; | 73 class Range; |
| 73 class Rect; | 74 class Rect; |
| 74 } | 75 } |
| 75 | 76 |
| 76 namespace media { | 77 namespace media { |
| 77 class CdmFactory; | 78 class CdmFactory; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 struct ResourceResponseHead; | 122 struct ResourceResponseHead; |
| 122 struct StartNavigationParams; | 123 struct StartNavigationParams; |
| 123 struct StreamOverrideParameters; | 124 struct StreamOverrideParameters; |
| 124 class VRDispatcher; | 125 class VRDispatcher; |
| 125 | 126 |
| 126 class CONTENT_EXPORT RenderFrameImpl | 127 class CONTENT_EXPORT RenderFrameImpl |
| 127 : public RenderFrame, | 128 : public RenderFrame, |
| 128 NON_EXPORTED_BASE(public blink::WebFrameClient), | 129 NON_EXPORTED_BASE(public blink::WebFrameClient), |
| 129 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) { | 130 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) { |
| 130 public: | 131 public: |
| 131 // Creates a new RenderFrame. |render_view| is the RenderView object that this | 132 static RenderFrameImpl* CreateMainFrame( |
| 132 // frame belongs to. | 133 RenderViewImpl* render_view, |
| 133 // Callers *must* call |SetWebFrame| immediately after creation. | 134 int32 routing_id, |
| 134 // Note: This is called only when RenderFrame is created by Blink through | 135 int32 widget_routing_id, |
| 135 // createChildFrame. | 136 int32 surface_id, |
| 136 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. | 137 bool hidden, |
| 137 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); | 138 const blink::WebScreenInfo& screen_info, |
| 139 CompositorDependencies* compositor_deps); | |
| 138 | 140 |
| 141 // TODO(dcheng): This should probably be renamed to CreateChildFrame. | |
|
ncarter (slow)
2015/08/24 20:55:35
I agree. There are only two callers, so I think yo
dcheng
2015/09/03 16:33:09
It turns out this isn't just used for subframes, s
| |
| 139 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame | 142 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame |
| 140 // identified by |parent_routing_id| or as the top-level frame if the latter | 143 // identified by |parent_routing_id| or as the top-level frame if the latter |
| 141 // is MSG_ROUTING_NONE. If |proxy_routing_id| is MSG_ROUTING_NONE, it creates | 144 // is MSG_ROUTING_NONE. If |proxy_routing_id| is MSG_ROUTING_NONE, it creates |
| 142 // the Blink WebLocalFrame and inserts it into the frame tree after the frame | 145 // the Blink WebLocalFrame and inserts it into the frame tree after the frame |
| 143 // identified by |previous_sibling_routing_id|, or as the first child if | 146 // identified by |previous_sibling_routing_id|, or as the first child if |
| 144 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is | 147 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is |
| 145 // semi-orphaned until it commits, at which point it replaces the proxy | 148 // semi-orphaned until it commits, at which point it replaces the proxy |
| 146 // identified by |proxy_routing_id|. Note: This is called only when | 149 // identified by |proxy_routing_id|. Note: This is called only when |
| 147 // RenderFrame is being created in response to IPC message from the browser | 150 // RenderFrame is being created in response to IPC message from the browser |
| 148 // process. All other frame creation is driven through Blink and Create. | 151 // process. All other frame creation is driven through Blink and Create. |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 617 int id_; | 620 int id_; |
| 618 bool notify_result_; | 621 bool notify_result_; |
| 619 int routing_id_; | 622 int routing_id_; |
| 620 base::WeakPtr<RenderFrameImpl> render_frame_impl_; | 623 base::WeakPtr<RenderFrameImpl> render_frame_impl_; |
| 621 | 624 |
| 622 DISALLOW_COPY_AND_ASSIGN(JavaScriptIsolatedWorldRequest); | 625 DISALLOW_COPY_AND_ASSIGN(JavaScriptIsolatedWorldRequest); |
| 623 }; | 626 }; |
| 624 | 627 |
| 625 typedef std::map<GURL, double> HostZoomLevels; | 628 typedef std::map<GURL, double> HostZoomLevels; |
| 626 | 629 |
| 630 // Creates a new RenderFrame. |render_view| is the RenderView object that this | |
| 631 // frame belongs to. | |
| 632 // Callers *must* call |SetWebFrame| immediately after creation. | |
| 633 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); | |
| 634 | |
| 627 // Functions to add and remove observers for this object. | 635 // Functions to add and remove observers for this object. |
| 628 void AddObserver(RenderFrameObserver* observer); | 636 void AddObserver(RenderFrameObserver* observer); |
| 629 void RemoveObserver(RenderFrameObserver* observer); | 637 void RemoveObserver(RenderFrameObserver* observer); |
| 630 | 638 |
| 631 // Builds and sends DidCommitProvisionalLoad to the host. | 639 // Builds and sends DidCommitProvisionalLoad to the host. |
| 632 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, | 640 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, |
| 633 blink::WebHistoryCommitType commit_type, | 641 blink::WebHistoryCommitType commit_type, |
| 634 const blink::WebHistoryItem& item); | 642 const blink::WebHistoryItem& item); |
| 635 | 643 |
| 636 // IPC message handlers ------------------------------------------------------ | 644 // IPC message handlers ------------------------------------------------------ |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1038 #endif | 1046 #endif |
| 1039 | 1047 |
| 1040 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1048 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1041 | 1049 |
| 1042 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1050 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1043 }; | 1051 }; |
| 1044 | 1052 |
| 1045 } // namespace content | 1053 } // namespace content |
| 1046 | 1054 |
| 1047 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1055 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |