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