| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDER_VIEW_HOST_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_RENDER_VIEW_HOST_MANAGER_H_ |
| 6 #define CHROME_BROWSER_RENDER_VIEW_HOST_MANAGER_H_ | 6 #define CHROME_BROWSER_RENDER_VIEW_HOST_MANAGER_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // deleting it. | 62 // deleting it. |
| 63 RenderViewHostManager(RenderViewHostFactory* render_view_factory, | 63 RenderViewHostManager(RenderViewHostFactory* render_view_factory, |
| 64 RenderViewHostDelegate* render_view_delegate, | 64 RenderViewHostDelegate* render_view_delegate, |
| 65 Delegate* delegate); | 65 Delegate* delegate); |
| 66 ~RenderViewHostManager(); | 66 ~RenderViewHostManager(); |
| 67 | 67 |
| 68 // For arguments, see WebContents constructor. | 68 // For arguments, see WebContents constructor. |
| 69 void Init(Profile* profile, | 69 void Init(Profile* profile, |
| 70 SiteInstance* site_instance, | 70 SiteInstance* site_instance, |
| 71 int routing_id, | 71 int routing_id, |
| 72 HANDLE modal_dialog_event); | 72 base::WaitableEvent* modal_dialog_event); |
| 73 | 73 |
| 74 // Schedules all RenderViewHosts for destruction. | 74 // Schedules all RenderViewHosts for destruction. |
| 75 void Shutdown(); | 75 void Shutdown(); |
| 76 | 76 |
| 77 // Returns the currently actuive RenderViewHost. | 77 // Returns the currently actuive RenderViewHost. |
| 78 // | 78 // |
| 79 // This will be non-NULL between Init() and Shutdown(). You may want to NULL | 79 // This will be non-NULL between Init() and Shutdown(). You may want to NULL |
| 80 // check it in many cases, however. Windows can send us messages during the | 80 // check it in many cases, however. Windows can send us messages during the |
| 81 // destruction process after it has been shut down. | 81 // destruction process after it has been shut down. |
| 82 RenderViewHost* current_host() const { | 82 RenderViewHost* current_host() const { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 SiteInstance* curr_instance); | 172 SiteInstance* curr_instance); |
| 173 | 173 |
| 174 // Helper method to create a pending RenderViewHost for a cross-site | 174 // Helper method to create a pending RenderViewHost for a cross-site |
| 175 // navigation. | 175 // navigation. |
| 176 bool CreatePendingRenderView(SiteInstance* instance); | 176 bool CreatePendingRenderView(SiteInstance* instance); |
| 177 | 177 |
| 178 // Creates a RenderViewHost using render_view_factory_ (or directly, if the | 178 // Creates a RenderViewHost using render_view_factory_ (or directly, if the |
| 179 // factory is NULL). | 179 // factory is NULL). |
| 180 RenderViewHost* CreateRenderViewHost(SiteInstance* instance, | 180 RenderViewHost* CreateRenderViewHost(SiteInstance* instance, |
| 181 int routing_id, | 181 int routing_id, |
| 182 HANDLE modal_dialog_event); | 182 base::WaitableEvent* modal_dialog_event); |
| 183 | 183 |
| 184 // Replaces the currently shown render_view_host_ with the RenderViewHost in | 184 // Replaces the currently shown render_view_host_ with the RenderViewHost in |
| 185 // the field pointed to by |new_render_view_host|, and then NULLs the field. | 185 // the field pointed to by |new_render_view_host|, and then NULLs the field. |
| 186 // Callers should only pass pointers to the pending_render_view_host_, | 186 // Callers should only pass pointers to the pending_render_view_host_, |
| 187 // interstitial_render_view_host_, or original_render_view_host_ fields of | 187 // interstitial_render_view_host_, or original_render_view_host_ fields of |
| 188 // this object. If |destroy_after|, this method will call | 188 // this object. If |destroy_after|, this method will call |
| 189 // ScheduleDeferredDestroy on the previous render_view_host_. | 189 // ScheduleDeferredDestroy on the previous render_view_host_. |
| 190 void SwapToRenderView(RenderViewHost** new_render_view_host, | 190 void SwapToRenderView(RenderViewHost** new_render_view_host, |
| 191 bool destroy_after); | 191 bool destroy_after); |
| 192 | 192 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 // The "details" for a NOTIFY_RENDER_VIEW_HOST_CHANGED notification. The old | 226 // The "details" for a NOTIFY_RENDER_VIEW_HOST_CHANGED notification. The old |
| 227 // host can be NULL when the first RenderViewHost is set. | 227 // host can be NULL when the first RenderViewHost is set. |
| 228 struct RenderViewHostSwitchedDetails { | 228 struct RenderViewHostSwitchedDetails { |
| 229 RenderViewHost* old_host; | 229 RenderViewHost* old_host; |
| 230 RenderViewHost* new_host; | 230 RenderViewHost* new_host; |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 #endif // CHROME_BROWSER_RENDER_VIEW_HOST_MANAGER_H_ | 233 #endif // CHROME_BROWSER_RENDER_VIEW_HOST_MANAGER_H_ |
| 234 | 234 |
| OLD | NEW |