Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.h

Issue 616133002: Make RenderFrame(Host) own a RenderWidget(Host). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
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 TestWebContents; 44 class TestWebContents;
45 class WebUIImpl; 45 class WebUIImpl;
46 struct NavigationBeforeCommitInfo; 46 struct NavigationBeforeCommitInfo;
47 47
48 // Flag arguments for RenderFrameHostManager::CreateRenderFrame.
49 enum CreateRenderFrameFlags {
50 // Used for creation of a swapped out RenderFrame.
51 SWAPPED_OUT = 1 << 0,
52 // The new RenderFrame is being created for a navigation of the
53 // top-level frame.
54 FOR_MAIN_FRAME_NAVIGATION = 1 << 1,
55 // The RenderFrame is initially hidden.
56 HIDDEN = 1 << 2,
57 // The RenderFrameHost will have a new RenderWidgetHost created and
58 // attached to it. This is used when the RenderFrameHost is the root
59 // of a subtree of frames that are being rendered in the same process.
60 CREATE_RENDER_WIDGET_HOST = 1 << 3
61 };
62
48 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state 63 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state
49 // machine to make cross-process navigations in a frame possible. 64 // machine to make cross-process navigations in a frame possible.
50 class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { 65 class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
51 public: 66 public:
52 // Functions implemented by our owner that we need. 67 // Functions implemented by our owner that we need.
53 // 68 //
54 // TODO(brettw) Clean this up! These are all the functions in WebContentsImpl 69 // 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 70 // that are required to run this class. The design should probably be better
56 // such that these are more clear. 71 // such that these are more clear.
57 // 72 //
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Resume navigation paused after receiving response headers. 261 // Resume navigation paused after receiving response headers.
247 void ResumeResponseDeferredAtStart(); 262 void ResumeResponseDeferredAtStart();
248 263
249 // Called when a renderer's frame navigates. 264 // Called when a renderer's frame navigates.
250 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host); 265 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host);
251 266
252 // Called when a renderer sets its opener to null. 267 // Called when a renderer sets its opener to null.
253 void DidDisownOpener(RenderFrameHost* render_frame_host); 268 void DidDisownOpener(RenderFrameHost* render_frame_host);
254 269
255 // Helper method to create and initialize a RenderFrameHost. If |swapped_out| 270 // Helper method to create and initialize a RenderFrameHost. If |swapped_out|
256 // is true, it will be initially placed on the swapped out hosts list. 271 // is true, it will be initially placed on the swapped out hosts list.
Charlie Reis 2014/10/02 00:06:57 This is the sentence I thought we might move into
kenrb 2014/10/02 20:20:48 Done.
257 // Returns the routing id of the *view* associated with the frame. 272 // Returns the routing id of the *view* associated with the frame.
258 int CreateRenderFrame(SiteInstance* instance, 273 int CreateRenderFrame(SiteInstance* instance,
259 int opener_route_id, 274 int opener_route_id,
260 bool swapped_out, 275 int flags);
261 bool for_main_frame_navigation,
262 bool hidden);
263 276
264 // Helper method to create and initialize a RenderFrameProxyHost and return 277 // Helper method to create and initialize a RenderFrameProxyHost and return
265 // its routing id. 278 // its routing id.
266 int CreateRenderFrameProxy(SiteInstance* instance); 279 int CreateRenderFrameProxy(SiteInstance* instance);
267 280
268 // Sets the passed passed interstitial as the currently showing interstitial. 281 // Sets the passed passed interstitial as the currently showing interstitial.
269 // |interstitial_page| should be non NULL (use the remove_interstitial_page 282 // |interstitial_page| should be non NULL (use the remove_interstitial_page
270 // method to unset the interstitial) and no interstitial page should be set 283 // method to unset the interstitial) and no interstitial page should be set
271 // when there is already a non NULL interstitial page set. 284 // when there is already a non NULL interstitial page set.
272 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { 285 void set_interstitial_page(InterstitialPageImpl* interstitial_page) {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 scoped_ptr<NavigationRequest> navigation_request_; 550 scoped_ptr<NavigationRequest> navigation_request_;
538 551
539 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 552 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
540 553
541 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 554 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
542 }; 555 };
543 556
544 } // namespace content 557 } // namespace content
545 558
546 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 559 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698