| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "content/browser/renderer_host/render_view_host_delegate.h" | 12 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 13 #include "content/browser/site_instance_impl.h" | 13 #include "content/browser/site_instance_impl.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 #include "content/public/common/referrer.h" | 17 #include "content/public/common/referrer.h" |
| 18 | 18 |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class BrowserContext; | 21 class BrowserContext; |
| 22 class InterstitialPageImpl; | 22 class InterstitialPageImpl; |
| 23 class NavigationControllerImpl; | 23 class NavigationControllerImpl; |
| 24 class NavigationEntry; | 24 class NavigationEntry; |
| 25 class NavigationEntryImpl; | 25 class NavigationEntryImpl; |
| 26 class RenderFrameHostDelegate; |
| 26 class RenderFrameHostManagerTest; | 27 class RenderFrameHostManagerTest; |
| 27 class RenderViewHost; | 28 class RenderViewHost; |
| 28 class RenderViewHostImpl; | 29 class RenderViewHostImpl; |
| 29 class RenderWidgetHostDelegate; | 30 class RenderWidgetHostDelegate; |
| 30 class RenderWidgetHostView; | 31 class RenderWidgetHostView; |
| 31 class TestWebContents; | 32 class TestWebContents; |
| 32 class WebUIImpl; | 33 class WebUIImpl; |
| 33 | 34 |
| 34 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state | 35 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state |
| 35 // machine to make cross-process navigations in a frame possible. | 36 // machine to make cross-process navigations in a frame possible. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 virtual ~Delegate() {} | 107 virtual ~Delegate() {} |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 // All three delegate pointers must be non-NULL and are not owned by this | 110 // All three delegate pointers must be non-NULL and are not owned by this |
| 110 // class. They must outlive this class. The RenderViewHostDelegate and | 111 // class. They must outlive this class. The RenderViewHostDelegate and |
| 111 // RenderWidgetHostDelegate are what will be installed into all | 112 // RenderWidgetHostDelegate are what will be installed into all |
| 112 // RenderViewHosts that are created. | 113 // RenderViewHosts that are created. |
| 113 // | 114 // |
| 114 // You must call Init() before using this class. | 115 // You must call Init() before using this class. |
| 115 RenderFrameHostManager( | 116 RenderFrameHostManager( |
| 117 RenderFrameHostDelegate* render_frame_delegate, |
| 116 RenderViewHostDelegate* render_view_delegate, | 118 RenderViewHostDelegate* render_view_delegate, |
| 117 RenderWidgetHostDelegate* render_widget_delegate, | 119 RenderWidgetHostDelegate* render_widget_delegate, |
| 118 Delegate* delegate); | 120 Delegate* delegate); |
| 119 virtual ~RenderFrameHostManager(); | 121 virtual ~RenderFrameHostManager(); |
| 120 | 122 |
| 121 // For arguments, see WebContentsImpl constructor. | 123 // For arguments, see WebContentsImpl constructor. |
| 122 void Init(BrowserContext* browser_context, | 124 void Init(BrowserContext* browser_context, |
| 123 SiteInstance* site_instance, | 125 SiteInstance* site_instance, |
| 124 int routing_id, | 126 int routing_id, |
| 125 int main_frame_routing_id); | 127 int main_frame_routing_id); |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 // Our delegate, not owned by us. Guaranteed non-NULL. | 351 // Our delegate, not owned by us. Guaranteed non-NULL. |
| 350 Delegate* delegate_; | 352 Delegate* delegate_; |
| 351 | 353 |
| 352 // Whether a navigation requiring different RenderView's is pending. This is | 354 // Whether a navigation requiring different RenderView's is pending. This is |
| 353 // either cross-site request is (in the new process model), or when required | 355 // either cross-site request is (in the new process model), or when required |
| 354 // for the view type (like view source versus not). | 356 // for the view type (like view source versus not). |
| 355 bool cross_navigation_pending_; | 357 bool cross_navigation_pending_; |
| 356 | 358 |
| 357 // Implemented by the owner of this class, these delegates are installed into | 359 // Implemented by the owner of this class, these delegates are installed into |
| 358 // all the RenderViewHosts that we create. | 360 // all the RenderViewHosts that we create. |
| 361 RenderFrameHostDelegate* render_frame_delegate_; |
| 359 RenderViewHostDelegate* render_view_delegate_; | 362 RenderViewHostDelegate* render_view_delegate_; |
| 360 RenderWidgetHostDelegate* render_widget_delegate_; | 363 RenderWidgetHostDelegate* render_widget_delegate_; |
| 361 | 364 |
| 362 // Our RenderView host and its associated Web UI (if any, will be NULL for | 365 // Our RenderView host and its associated Web UI (if any, will be NULL for |
| 363 // non-DOM-UI pages). This object is responsible for all communication with | 366 // non-DOM-UI pages). This object is responsible for all communication with |
| 364 // a child RenderView instance. | 367 // a child RenderView instance. |
| 365 RenderViewHostImpl* render_view_host_; | 368 RenderViewHostImpl* render_view_host_; |
| 366 scoped_ptr<WebUIImpl> web_ui_; | 369 scoped_ptr<WebUIImpl> web_ui_; |
| 367 | 370 |
| 368 // A RenderViewHost used to load a cross-site page. This remains hidden | 371 // A RenderViewHost used to load a cross-site page. This remains hidden |
| (...skipping 28 matching lines...) Expand all Loading... |
| 397 InterstitialPageImpl* interstitial_page_; | 400 InterstitialPageImpl* interstitial_page_; |
| 398 | 401 |
| 399 NotificationRegistrar registrar_; | 402 NotificationRegistrar registrar_; |
| 400 | 403 |
| 401 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 404 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
| 402 }; | 405 }; |
| 403 | 406 |
| 404 } // namespace content | 407 } // namespace content |
| 405 | 408 |
| 406 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 409 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
| OLD | NEW |