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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 int proxy_routing_id); | 121 int proxy_routing_id); |
122 | 122 |
123 // Returns the RenderFrameImpl for the given routing ID. | 123 // Returns the RenderFrameImpl for the given routing ID. |
124 static RenderFrameImpl* FromRoutingID(int routing_id); | 124 static RenderFrameImpl* FromRoutingID(int routing_id); |
125 | 125 |
126 // Just like RenderFrame::FromWebFrame but returns the implementation. | 126 // Just like RenderFrame::FromWebFrame but returns the implementation. |
127 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); | 127 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
128 | 128 |
129 // Used by content_layouttest_support to hook into the creation of | 129 // Used by content_layouttest_support to hook into the creation of |
130 // RenderFrameImpls. | 130 // RenderFrameImpls. |
| 131 using CreateRenderFrameImplFunction = RenderFrameImpl* (*)(RenderViewImpl*, |
| 132 int32); |
131 static void InstallCreateHook( | 133 static void InstallCreateHook( |
132 RenderFrameImpl* (*create_render_frame_impl)(RenderViewImpl*, int32)); | 134 CreateRenderFrameImplFunction create_render_frame_impl); |
133 | 135 |
134 virtual ~RenderFrameImpl(); | 136 virtual ~RenderFrameImpl(); |
135 | 137 |
136 bool is_swapped_out() const { | 138 bool is_swapped_out() const { |
137 return is_swapped_out_; | 139 return is_swapped_out_; |
138 } | 140 } |
139 | 141 |
140 // TODO(nasko): This can be removed once we don't have a swapped out state on | 142 // TODO(nasko): This can be removed once we don't have a swapped out state on |
141 // RenderFrames. See https://crbug.com/357747. | 143 // RenderFrames. See https://crbug.com/357747. |
142 void set_render_frame_proxy(RenderFrameProxy* proxy) { | 144 void set_render_frame_proxy(RenderFrameProxy* proxy) { |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 #endif | 817 #endif |
816 | 818 |
817 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 819 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
818 | 820 |
819 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 821 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
820 }; | 822 }; |
821 | 823 |
822 } // namespace content | 824 } // namespace content |
823 | 825 |
824 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 826 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |