OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 26 matching lines...) Expand all Loading... | |
37 class SessionStorageNamespace; | 37 class SessionStorageNamespace; |
38 class SiteInstance; | 38 class SiteInstance; |
39 class SkBitmap; | 39 class SkBitmap; |
40 class ViewMsg_Navigate; | 40 class ViewMsg_Navigate; |
41 struct ContextMenuParams; | 41 struct ContextMenuParams; |
42 struct MediaPlayerAction; | 42 struct MediaPlayerAction; |
43 struct ViewHostMsg_AccessibilityNotification_Params; | 43 struct ViewHostMsg_AccessibilityNotification_Params; |
44 struct ViewHostMsg_CreateWindow_Params; | 44 struct ViewHostMsg_CreateWindow_Params; |
45 struct ViewHostMsg_ShowPopup_Params; | 45 struct ViewHostMsg_ShowPopup_Params; |
46 struct ViewMsg_Navigate_Params; | 46 struct ViewMsg_Navigate_Params; |
47 struct ViewMsg_PostMessage_Params; | |
47 struct ViewMsg_StopFinding_Params; | 48 struct ViewMsg_StopFinding_Params; |
49 struct ViewMsg_SwapOut_Params; | |
48 struct WebDropData; | 50 struct WebDropData; |
49 struct WebPreferences; | 51 struct WebPreferences; |
50 | 52 |
51 namespace base { | 53 namespace base { |
52 class ListValue; | 54 class ListValue; |
53 } | 55 } |
54 | 56 |
55 namespace content { | 57 namespace content { |
56 struct FileChooserParams; | 58 struct FileChooserParams; |
57 struct Referrer; | 59 struct Referrer; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
148 RenderViewHostDelegate* delegate() const { return delegate_; } | 150 RenderViewHostDelegate* delegate() const { return delegate_; } |
149 void set_delegate(RenderViewHostDelegate* d) { | 151 void set_delegate(RenderViewHostDelegate* d) { |
150 CHECK(d); // http://crbug.com/82827 | 152 CHECK(d); // http://crbug.com/82827 |
151 delegate_ = d; | 153 delegate_ = d; |
152 } | 154 } |
153 | 155 |
154 // Set up the RenderView child process. Virtual because it is overridden by | 156 // Set up the RenderView child process. Virtual because it is overridden by |
155 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used | 157 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used |
156 // as the name of the new top-level frame. If |max_page_id| is larger than | 158 // as the name of the new top-level frame. If |max_page_id| is larger than |
157 // -1, the RenderView is told to start issuing page IDs at |max_page_id| + 1. | 159 // -1, the RenderView is told to start issuing page IDs at |max_page_id| + 1. |
158 virtual bool CreateRenderView(const string16& frame_name, int32 max_page_id); | 160 virtual bool CreateRenderView(const string16& frame_name, |
161 int opener_route_id, | |
162 int32 max_page_id); | |
159 | 163 |
160 // Returns true if the RenderView is active and has not crashed. Virtual | 164 // Returns true if the RenderView is active and has not crashed. Virtual |
161 // because it is overridden by TestRenderViewHost. | 165 // because it is overridden by TestRenderViewHost. |
162 virtual bool IsRenderViewLive() const; | 166 virtual bool IsRenderViewLive() const; |
163 | 167 |
164 base::TerminationStatus render_view_termination_status() const { | 168 base::TerminationStatus render_view_termination_status() const { |
165 return render_view_termination_status_; | 169 return render_view_termination_status_; |
166 } | 170 } |
167 | 171 |
168 // Send the renderer process the current preferences supplied by the | 172 // Send the renderer process the current preferences supplied by the |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 // different renderer process. It should run its unload handler and move to | 223 // different renderer process. It should run its unload handler and move to |
220 // a blank document. The renderer should preserve the Frame object until it | 224 // a blank document. The renderer should preserve the Frame object until it |
221 // exits, in case we come back. The renderer can exit if it has no other | 225 // exits, in case we come back. The renderer can exit if it has no other |
222 // active RenderViews, but not until WasSwappedOut is called (when it is no | 226 // active RenderViews, but not until WasSwappedOut is called (when it is no |
223 // longer visible). | 227 // longer visible). |
224 // | 228 // |
225 // Please see ViewMsg_SwapOut_Params in view_messages.h for a description | 229 // Please see ViewMsg_SwapOut_Params in view_messages.h for a description |
226 // of the parameters. | 230 // of the parameters. |
227 void SwapOut(int new_render_process_host_id, int new_request_id); | 231 void SwapOut(int new_render_process_host_id, int new_request_id); |
228 | 232 |
233 // Performs the actual swap out, causing the RenderView to become a proxy | |
234 // for the specified content_frame. This is called by SwapOut. | |
235 void SwapOutAndProxy(int new_render_process_host_id, | |
awong
2011/12/21 01:56:07
Should this be private?
| |
236 int new_request_id, | |
237 int64 content_frame); | |
238 | |
229 // Called by ResourceDispatcherHost after the SwapOutACK is received. | 239 // Called by ResourceDispatcherHost after the SwapOutACK is received. |
230 void OnSwapOutACK(); | 240 void OnSwapOutACK(); |
231 | 241 |
232 // Called to notify the renderer that it has been visibly swapped out and | 242 // Called to notify the renderer that it has been visibly swapped out and |
233 // replaced by another RenderViewHost, after an earlier call to SwapOut. | 243 // replaced by another RenderViewHost, after an earlier call to SwapOut. |
234 // It is now safe for the process to exit if there are no other active | 244 // It is now safe for the process to exit if there are no other active |
235 // RenderViews. | 245 // RenderViews. |
236 void WasSwappedOut(); | 246 void WasSwappedOut(); |
237 | 247 |
238 // Causes the renderer to close the current page, including running its | 248 // Causes the renderer to close the current page, including running its |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
684 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; | 694 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; |
685 PowerSaveBlockerMap power_save_blockers_; | 695 PowerSaveBlockerMap power_save_blockers_; |
686 | 696 |
687 // A list of observers that filter messages. Weak references. | 697 // A list of observers that filter messages. Weak references. |
688 ObserverList<content::RenderViewHostObserver> observers_; | 698 ObserverList<content::RenderViewHostObserver> observers_; |
689 | 699 |
690 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 700 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
691 }; | 701 }; |
692 | 702 |
693 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 703 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |