| 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_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/browser/site_instance_impl.h" | 12 #include "content/browser/site_instance_impl.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
| 15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
| 16 #include "content/public/browser/render_view_host_delegate.h" | 16 #include "content/public/browser/render_view_host_delegate.h" |
| 17 | 17 |
| 18 class InterstitialPageImpl; | 18 class InterstitialPageImpl; |
| 19 class NavigationControllerImpl; | 19 class NavigationControllerImpl; |
| 20 class RenderViewHost; | 20 class RenderViewHost; |
| 21 class RenderWidgetHostView; | |
| 22 class WebUIImpl; | 21 class WebUIImpl; |
| 23 | 22 |
| 24 namespace content { | 23 namespace content { |
| 25 class BrowserContext; | 24 class BrowserContext; |
| 26 class NavigationEntry; | 25 class NavigationEntry; |
| 27 class NavigationEntryImpl; | 26 class NavigationEntryImpl; |
| 27 class RenderWidgetHostView; |
| 28 } | 28 } |
| 29 | 29 |
| 30 // Manages RenderViewHosts for a TabContents. Normally there is only one and | 30 // Manages RenderViewHosts for a TabContents. Normally there is only one and |
| 31 // it is easy to do. But we can also have transitions of processes (and hence | 31 // it is easy to do. But we can also have transitions of processes (and hence |
| 32 // RenderViewHosts) that can get complex. | 32 // RenderViewHosts) that can get complex. |
| 33 class CONTENT_EXPORT RenderViewHostManager | 33 class CONTENT_EXPORT RenderViewHostManager |
| 34 : public content::RenderViewHostDelegate::RendererManagement, | 34 : public content::RenderViewHostDelegate::RendererManagement, |
| 35 public content::NotificationObserver { | 35 public content::NotificationObserver { |
| 36 public: | 36 public: |
| 37 // Functions implemented by our owner that we need. | 37 // Functions implemented by our owner that we need. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // | 108 // |
| 109 // This will be non-NULL between Init() and Shutdown(). You may want to NULL | 109 // This will be non-NULL between Init() and Shutdown(). You may want to NULL |
| 110 // check it in many cases, however. Windows can send us messages during the | 110 // check it in many cases, however. Windows can send us messages during the |
| 111 // destruction process after it has been shut down. | 111 // destruction process after it has been shut down. |
| 112 RenderViewHost* current_host() const { | 112 RenderViewHost* current_host() const { |
| 113 return render_view_host_; | 113 return render_view_host_; |
| 114 } | 114 } |
| 115 | 115 |
| 116 // Returns the view associated with the current RenderViewHost, or NULL if | 116 // Returns the view associated with the current RenderViewHost, or NULL if |
| 117 // there is no current one. | 117 // there is no current one. |
| 118 RenderWidgetHostView* GetRenderWidgetHostView() const; | 118 content::RenderWidgetHostView* GetRenderWidgetHostView() const; |
| 119 | 119 |
| 120 // Returns the pending render view host, or NULL if there is no pending one. | 120 // Returns the pending render view host, or NULL if there is no pending one. |
| 121 RenderViewHost* pending_render_view_host() const { | 121 RenderViewHost* pending_render_view_host() const { |
| 122 return pending_render_view_host_; | 122 return pending_render_view_host_; |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Returns the current committed Web UI or NULL if none applies. | 125 // Returns the current committed Web UI or NULL if none applies. |
| 126 WebUIImpl* web_ui() const { return web_ui_.get(); } | 126 WebUIImpl* web_ui() const { return web_ui_.get(); } |
| 127 | 127 |
| 128 // Returns the Web UI for the pending navigation, or NULL of none applies. | 128 // Returns the Web UI for the pending navigation, or NULL of none applies. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // The intersitial page currently shown if any, not own by this class | 286 // The intersitial page currently shown if any, not own by this class |
| 287 // (the InterstitialPage is self-owned, it deletes itself when hidden). | 287 // (the InterstitialPage is self-owned, it deletes itself when hidden). |
| 288 InterstitialPageImpl* interstitial_page_; | 288 InterstitialPageImpl* interstitial_page_; |
| 289 | 289 |
| 290 content::NotificationRegistrar registrar_; | 290 content::NotificationRegistrar registrar_; |
| 291 | 291 |
| 292 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); | 292 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); |
| 293 }; | 293 }; |
| 294 | 294 |
| 295 #endif // CONTENT_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 295 #endif // CONTENT_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
| OLD | NEW |