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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 struct CustomContextMenuContext; | 71 struct CustomContextMenuContext; |
72 | 72 |
73 class CONTENT_EXPORT RenderFrameImpl | 73 class CONTENT_EXPORT RenderFrameImpl |
74 : public RenderFrame, | 74 : public RenderFrame, |
75 NON_EXPORTED_BASE(public blink::WebFrameClient), | 75 NON_EXPORTED_BASE(public blink::WebFrameClient), |
76 NON_EXPORTED_BASE(public WebMediaPlayerDelegate) { | 76 NON_EXPORTED_BASE(public WebMediaPlayerDelegate) { |
77 public: | 77 public: |
78 // Creates a new RenderFrame. |render_view| is the RenderView object that this | 78 // Creates a new RenderFrame. |render_view| is the RenderView object that this |
79 // frame belongs to. | 79 // frame belongs to. |
80 // Callers *must* call |SetWebFrame| immediately after creation. | 80 // Callers *must* call |SetWebFrame| immediately after creation. |
| 81 // Note: This is called only when RenderFrame is created by Blink through |
| 82 // createChildFrame. |
81 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. | 83 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. |
82 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); | 84 static RenderFrameImpl* Create(RenderViewImpl* render_view, |
| 85 int32 routing_id); |
| 86 |
| 87 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame |
| 88 // identified by |parent_routing_id| or as the top-level frame if |
| 89 // MSG_ROUTING_NONE. It creates the Blink WebLocalFrame and inserts it in the |
| 90 // proper place in the frame tree. |
| 91 // Note: This is called only when RenderFrame is being created in response to |
| 92 // IPC message from the browser process. All other frame creation is driven |
| 93 // through Blink and Create. |
| 94 static void CreateFrame(int routing_id, int parent_routing_id); |
83 | 95 |
84 // Returns the RenderFrameImpl for the given routing ID. | 96 // Returns the RenderFrameImpl for the given routing ID. |
85 static RenderFrameImpl* FromRoutingID(int routing_id); | 97 static RenderFrameImpl* FromRoutingID(int routing_id); |
86 | 98 |
87 // Just like RenderFrame::FromWebFrame but returns the implementation. | 99 // Just like RenderFrame::FromWebFrame but returns the implementation. |
88 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); | 100 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
89 | 101 |
90 // Used by content_layouttest_support to hook into the creation of | 102 // Used by content_layouttest_support to hook into the creation of |
91 // RenderFrameImpls. | 103 // RenderFrameImpls. |
92 static void InstallCreateHook( | 104 static void InstallCreateHook( |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 ScreenOrientationDispatcher* screen_orientation_dispatcher_; | 647 ScreenOrientationDispatcher* screen_orientation_dispatcher_; |
636 | 648 |
637 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 649 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
638 | 650 |
639 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 651 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
640 }; | 652 }; |
641 | 653 |
642 } // namespace content | 654 } // namespace content |
643 | 655 |
644 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 656 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |