| 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" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 class RenderFrameHost; | 33 class RenderFrameHost; |
| 34 class RenderFrameHostDelegate; | 34 class RenderFrameHostDelegate; |
| 35 class RenderFrameHost; | 35 class RenderFrameHost; |
| 36 class RenderFrameHostImpl; | 36 class RenderFrameHostImpl; |
| 37 class RenderFrameHostManagerTest; | 37 class RenderFrameHostManagerTest; |
| 38 class RenderFrameProxyHost; | 38 class RenderFrameProxyHost; |
| 39 class RenderViewHost; | 39 class RenderViewHost; |
| 40 class RenderViewHostImpl; | 40 class RenderViewHostImpl; |
| 41 class RenderWidgetHostDelegate; | 41 class RenderWidgetHostDelegate; |
| 42 class RenderWidgetHostView; | 42 class RenderWidgetHostView; |
| 43 class StreamHandle; |
| 43 class TestWebContents; | 44 class TestWebContents; |
| 44 class WebUIImpl; | 45 class WebUIImpl; |
| 45 struct NavigationBeforeCommitInfo; | 46 struct ResourceResponse; |
| 46 | 47 |
| 47 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state | 48 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state |
| 48 // machine to make cross-process navigations in a frame possible. | 49 // machine to make cross-process navigations in a frame possible. |
| 49 class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { | 50 class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
| 50 public: | 51 public: |
| 51 // Functions implemented by our owner that we need. | 52 // Functions implemented by our owner that we need. |
| 52 // | 53 // |
| 53 // TODO(brettw) Clean this up! These are all the functions in WebContentsImpl | 54 // TODO(brettw) Clean this up! These are all the functions in WebContentsImpl |
| 54 // that are required to run this class. The design should probably be better | 55 // that are required to run this class. The design should probably be better |
| 55 // such that these are more clear. | 56 // such that these are more clear. |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 322 |
| 322 // PlzNavigate: Used to start a navigation. OnBeginNavigation is called | 323 // PlzNavigate: Used to start a navigation. OnBeginNavigation is called |
| 323 // directly by RequestNavigation when there is no live renderer. Otherwise, it | 324 // directly by RequestNavigation when there is no live renderer. Otherwise, it |
| 324 // is called following a BeginNavigation IPC from the renderer (which in | 325 // is called following a BeginNavigation IPC from the renderer (which in |
| 325 // browser-initiated navigation also happens after RequestNavigation has been | 326 // browser-initiated navigation also happens after RequestNavigation has been |
| 326 // called). | 327 // called). |
| 327 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params); | 328 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params); |
| 328 | 329 |
| 329 // PlzNavigate: Called when a navigation request has received a response, to | 330 // PlzNavigate: Called when a navigation request has received a response, to |
| 330 // select a renderer to use for the navigation. | 331 // select a renderer to use for the navigation. |
| 331 void CommitNavigation(const NavigationBeforeCommitInfo& info); | 332 void CommitNavigation(const GURL& url, |
| 333 ResourceResponse* response, |
| 334 scoped_ptr<StreamHandle> body); |
| 332 | 335 |
| 333 private: | 336 private: |
| 334 friend class RenderFrameHostManagerTest; | 337 friend class RenderFrameHostManagerTest; |
| 335 friend class TestWebContents; | 338 friend class TestWebContents; |
| 336 | 339 |
| 337 FRIEND_TEST_ALL_PREFIXES(CrossProcessFrameTreeBrowserTest, | 340 FRIEND_TEST_ALL_PREFIXES(CrossProcessFrameTreeBrowserTest, |
| 338 CreateCrossProcessSubframeProxies); | 341 CreateCrossProcessSubframeProxies); |
| 339 | 342 |
| 340 // Returns the current navigation request (used in the PlzNavigate navigation | 343 // Returns the current navigation request (used in the PlzNavigate navigation |
| 341 // logic refactoring project). | 344 // logic refactoring project). |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 scoped_ptr<NavigationRequest> navigation_request_; | 539 scoped_ptr<NavigationRequest> navigation_request_; |
| 537 | 540 |
| 538 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 541 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
| 539 | 542 |
| 540 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 543 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
| 541 }; | 544 }; |
| 542 | 545 |
| 543 } // namespace content | 546 } // namespace content |
| 544 | 547 |
| 545 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 548 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
| OLD | NEW |