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 #include "content/browser/tab_contents/render_view_host_manager.h" | 5 #include "content/browser/tab_contents/render_view_host_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
11 #include "chrome/common/render_messages.h" | 11 #include "chrome/common/render_messages.h" |
12 #include "chrome/common/render_messages_params.h" | |
13 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
14 #include "content/browser/content_browser_client.h" | 13 #include "content/browser/content_browser_client.h" |
15 #include "content/browser/renderer_host/render_view_host.h" | 14 #include "content/browser/renderer_host/render_view_host.h" |
16 #include "content/browser/renderer_host/render_view_host_delegate.h" | 15 #include "content/browser/renderer_host/render_view_host_delegate.h" |
17 #include "content/browser/renderer_host/render_view_host_factory.h" | 16 #include "content/browser/renderer_host/render_view_host_factory.h" |
18 #include "content/browser/renderer_host/render_widget_host_view.h" | 17 #include "content/browser/renderer_host/render_widget_host_view.h" |
19 #include "content/browser/site_instance.h" | 18 #include "content/browser/site_instance.h" |
20 #include "content/browser/tab_contents/navigation_controller.h" | 19 #include "content/browser/tab_contents/navigation_controller.h" |
21 #include "content/browser/tab_contents/navigation_entry.h" | 20 #include "content/browser/tab_contents/navigation_entry.h" |
22 #include "content/browser/tab_contents/tab_contents_view.h" | 21 #include "content/browser/tab_contents/tab_contents_view.h" |
23 #include "content/browser/webui/web_ui.h" | 22 #include "content/browser/webui/web_ui.h" |
24 #include "content/browser/webui/web_ui_factory.h" | 23 #include "content/browser/webui/web_ui_factory.h" |
25 #include "content/common/notification_service.h" | 24 #include "content/common/notification_service.h" |
26 #include "content/common/notification_type.h" | 25 #include "content/common/notification_type.h" |
| 26 #include "content/common/view_messages.h" |
27 | 27 |
28 namespace base { | 28 namespace base { |
29 class WaitableEvent; | 29 class WaitableEvent; |
30 } | 30 } |
31 | 31 |
32 RenderViewHostManager::RenderViewHostManager( | 32 RenderViewHostManager::RenderViewHostManager( |
33 RenderViewHostDelegate* render_view_delegate, | 33 RenderViewHostDelegate* render_view_delegate, |
34 Delegate* delegate) | 34 Delegate* delegate) |
35 : delegate_(delegate), | 35 : delegate_(delegate), |
36 cross_navigation_pending_(false), | 36 cross_navigation_pending_(false), |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 Source<NavigationController>(&delegate_->GetControllerForRenderManager()), | 719 Source<NavigationController>(&delegate_->GetControllerForRenderManager()), |
720 Details<RenderViewHostSwitchedDetails>(&details)); | 720 Details<RenderViewHostSwitchedDetails>(&details)); |
721 | 721 |
722 // This will cause the old RenderViewHost to delete itself. | 722 // This will cause the old RenderViewHost to delete itself. |
723 old_render_view_host->Shutdown(); | 723 old_render_view_host->Shutdown(); |
724 | 724 |
725 // Let the task manager know that we've swapped RenderViewHosts, since it | 725 // Let the task manager know that we've swapped RenderViewHosts, since it |
726 // might need to update its process groupings. | 726 // might need to update its process groupings. |
727 delegate_->NotifySwappedFromRenderManager(); | 727 delegate_->NotifySwappedFromRenderManager(); |
728 } | 728 } |
OLD | NEW |