OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 class MediaWebContentsObserver; | 51 class MediaWebContentsObserver; |
52 class ChildProcessSecurityPolicyImpl; | 52 class ChildProcessSecurityPolicyImpl; |
53 class PageState; | 53 class PageState; |
54 class RenderWidgetHostDelegate; | 54 class RenderWidgetHostDelegate; |
55 class SessionStorageNamespace; | 55 class SessionStorageNamespace; |
56 class SessionStorageNamespaceImpl; | 56 class SessionStorageNamespaceImpl; |
57 class TestRenderViewHost; | 57 class TestRenderViewHost; |
58 struct FileChooserFileInfo; | 58 struct FileChooserFileInfo; |
59 struct FileChooserParams; | 59 struct FileChooserParams; |
| 60 struct FrameReplicationState; |
60 | 61 |
61 #if defined(COMPILER_MSVC) | 62 #if defined(COMPILER_MSVC) |
62 // RenderViewHostImpl is the bottom of a diamond-shaped hierarchy, | 63 // RenderViewHostImpl is the bottom of a diamond-shaped hierarchy, |
63 // with RenderWidgetHost at the root. VS warns when methods from the | 64 // with RenderWidgetHost at the root. VS warns when methods from the |
64 // root are overridden in only one of the base classes and not both | 65 // root are overridden in only one of the base classes and not both |
65 // (in this case, RenderWidgetHostImpl provides implementations of | 66 // (in this case, RenderWidgetHostImpl provides implementations of |
66 // many of the methods). This is a silly warning when dealing with | 67 // many of the methods). This is a silly warning when dealing with |
67 // pure virtual methods that only have a single implementation in the | 68 // pure virtual methods that only have a single implementation in the |
68 // hierarchy above this class, and is safe to ignore in this case. | 69 // hierarchy above this class, and is safe to ignore in this case. |
69 #pragma warning(push) | 70 #pragma warning(push) |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 // Set up the RenderView child process. Virtual because it is overridden by | 196 // Set up the RenderView child process. Virtual because it is overridden by |
196 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used | 197 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used |
197 // as the name of the new top-level frame. | 198 // as the name of the new top-level frame. |
198 // The |opener_route_id| parameter indicates which RenderView created this | 199 // The |opener_route_id| parameter indicates which RenderView created this |
199 // (MSG_ROUTING_NONE if none). If |max_page_id| is larger than -1, the | 200 // (MSG_ROUTING_NONE if none). If |max_page_id| is larger than -1, the |
200 // RenderView is told to start issuing page IDs at |max_page_id| + 1. | 201 // RenderView is told to start issuing page IDs at |max_page_id| + 1. |
201 // |window_was_created_with_opener| is true if this top-level frame was | 202 // |window_was_created_with_opener| is true if this top-level frame was |
202 // created with an opener. (The opener may have been closed since.) | 203 // created with an opener. (The opener may have been closed since.) |
203 // The |proxy_route_id| is only used when creating a RenderView in swapped out | 204 // The |proxy_route_id| is only used when creating a RenderView in swapped out |
204 // state. | 205 // state. |
205 virtual bool CreateRenderView(const base::string16& frame_name, | 206 virtual bool CreateRenderView( |
206 int opener_route_id, | 207 const base::string16& frame_name, |
207 int proxy_route_id, | 208 int opener_route_id, |
208 int32 max_page_id, | 209 int proxy_route_id, |
209 bool window_was_created_with_opener); | 210 int32 max_page_id, |
| 211 const FrameReplicationState& replicated_frame_state, |
| 212 bool window_was_created_with_opener); |
210 | 213 |
211 base::TerminationStatus render_view_termination_status() const { | 214 base::TerminationStatus render_view_termination_status() const { |
212 return render_view_termination_status_; | 215 return render_view_termination_status_; |
213 } | 216 } |
214 | 217 |
215 // Tracks whether this RenderViewHost is in an active state (rather than | 218 // Tracks whether this RenderViewHost is in an active state (rather than |
216 // pending swap out, pending deletion, or swapped out), according to its main | 219 // pending swap out, pending deletion, or swapped out), according to its main |
217 // frame RenderFrameHost. | 220 // frame RenderFrameHost. |
218 bool is_active() const { return is_active_; } | 221 bool is_active() const { return is_active_; } |
219 void set_is_active(bool is_active) { is_active_ = is_active; } | 222 void set_is_active(bool is_active) { is_active_ = is_active; } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 // Creates a new RenderWidget with the given route id. |popup_type| indicates | 296 // Creates a new RenderWidget with the given route id. |popup_type| indicates |
294 // if this widget is a popup and what kind of popup it is (select, autofill). | 297 // if this widget is a popup and what kind of popup it is (select, autofill). |
295 void CreateNewWidget(int route_id, blink::WebPopupType popup_type); | 298 void CreateNewWidget(int route_id, blink::WebPopupType popup_type); |
296 | 299 |
297 // Creates a full screen RenderWidget. | 300 // Creates a full screen RenderWidget. |
298 void CreateNewFullscreenWidget(int route_id); | 301 void CreateNewFullscreenWidget(int route_id); |
299 | 302 |
300 int main_frame_routing_id() const { | 303 int main_frame_routing_id() const { |
301 return main_frame_routing_id_; | 304 return main_frame_routing_id_; |
302 } | 305 } |
| 306 void set_main_frame_routing_id(int routing_id) { |
| 307 main_frame_routing_id_ = routing_id; |
| 308 } |
303 | 309 |
304 void OnTextSurroundingSelectionResponse(const base::string16& content, | 310 void OnTextSurroundingSelectionResponse(const base::string16& content, |
305 size_t start_offset, | 311 size_t start_offset, |
306 size_t end_offset); | 312 size_t end_offset); |
307 | 313 |
308 // Increases the refcounting on this RVH. This is done by the FrameTree on | 314 // Increases the refcounting on this RVH. This is done by the FrameTree on |
309 // creation of a RenderFrameHost. | 315 // creation of a RenderFrameHost. |
310 void increment_ref_count() { ++frames_ref_count_; } | 316 void increment_ref_count() { ++frames_ref_count_; } |
311 | 317 |
312 // Decreases the refcounting on this RVH. This is done by the FrameTree on | 318 // Decreases the refcounting on this RVH. This is done by the FrameTree on |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 471 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
466 }; | 472 }; |
467 | 473 |
468 #if defined(COMPILER_MSVC) | 474 #if defined(COMPILER_MSVC) |
469 #pragma warning(pop) | 475 #pragma warning(pop) |
470 #endif | 476 #endif |
471 | 477 |
472 } // namespace content | 478 } // namespace content |
473 | 479 |
474 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 480 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |