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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 struct CustomContextMenuContext; | 80 struct CustomContextMenuContext; |
81 | 81 |
82 class CONTENT_EXPORT RenderFrameImpl | 82 class CONTENT_EXPORT RenderFrameImpl |
83 : public RenderFrame, | 83 : public RenderFrame, |
84 NON_EXPORTED_BASE(public blink::WebFrameClient), | 84 NON_EXPORTED_BASE(public blink::WebFrameClient), |
85 NON_EXPORTED_BASE(public WebMediaPlayerDelegate) { | 85 NON_EXPORTED_BASE(public WebMediaPlayerDelegate) { |
86 public: | 86 public: |
87 // Creates a new RenderFrame. |render_view| is the RenderView object that this | 87 // Creates a new RenderFrame. |render_view| is the RenderView object that this |
88 // frame belongs to. | 88 // frame belongs to. |
89 // Callers *must* call |SetWebFrame| immediately after creation. | 89 // Callers *must* call |SetWebFrame| immediately after creation. |
90 // Note: This is called only when RenderFrame is created by Blink through | |
91 // createChildFrame. | |
92 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. | 90 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. |
93 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); | 91 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); |
94 | 92 |
95 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame | |
96 // identified by |parent_routing_id| or as the top-level frame if the latter | |
97 // is MSG_ROUTING_NONE. It creates the Blink WebLocalFrame and inserts it in | |
98 // the proper place in the frame tree. | |
99 // Note: This is called only when RenderFrame is being created in response to | |
100 // IPC message from the browser process. All other frame creation is driven | |
101 // through Blink and Create. | |
102 static void CreateFrame(int routing_id, int parent_routing_id); | |
103 | |
104 // Returns the RenderFrameImpl for the given routing ID. | 93 // Returns the RenderFrameImpl for the given routing ID. |
105 static RenderFrameImpl* FromRoutingID(int routing_id); | 94 static RenderFrameImpl* FromRoutingID(int routing_id); |
106 | 95 |
107 // Just like RenderFrame::FromWebFrame but returns the implementation. | 96 // Just like RenderFrame::FromWebFrame but returns the implementation. |
108 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); | 97 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
109 | 98 |
110 // Used by content_layouttest_support to hook into the creation of | 99 // Used by content_layouttest_support to hook into the creation of |
111 // RenderFrameImpls. | 100 // RenderFrameImpls. |
112 static void InstallCreateHook( | 101 static void InstallCreateHook( |
113 RenderFrameImpl* (*create_render_frame_impl)(RenderViewImpl*, int32)); | 102 RenderFrameImpl* (*create_render_frame_impl)(RenderViewImpl*, int32)); |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 RendererAccessibility* renderer_accessibility_; | 695 RendererAccessibility* renderer_accessibility_; |
707 | 696 |
708 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 697 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
709 | 698 |
710 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 699 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
711 }; | 700 }; |
712 | 701 |
713 } // namespace content | 702 } // namespace content |
714 | 703 |
715 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 704 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |