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