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

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

Issue 281663002: Create RenderFrameProxyHost at time of swap-out instead of commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 6 years, 7 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 | Annotate | Revision Log
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // There is additional complexity that some of the functions we need in 51 // There is additional complexity that some of the functions we need in
52 // WebContentsImpl are inherited and non-virtual. These are named with 52 // WebContentsImpl are inherited and non-virtual. These are named with
53 // "RenderManager" so that the duplicate implementation of them will be clear. 53 // "RenderManager" so that the duplicate implementation of them will be clear.
54 class CONTENT_EXPORT Delegate { 54 class CONTENT_EXPORT Delegate {
55 public: 55 public:
56 // Initializes the given renderer if necessary and creates the view ID 56 // Initializes the given renderer if necessary and creates the view ID
57 // corresponding to this view host. If this method is not called and the 57 // corresponding to this view host. If this method is not called and the
58 // process is not shared, then the WebContentsImpl will act as though the 58 // process is not shared, then the WebContentsImpl will act as though the
59 // renderer is not running (i.e., it will render "sad tab"). This method is 59 // renderer is not running (i.e., it will render "sad tab"). This method is
60 // automatically called from LoadURL. 60 // automatically called from LoadURL.
61 //
62 // If you are attaching to an already-existing RenderView, you should call
63 // InitWithExistingID.
64 virtual bool CreateRenderViewForRenderManager( 61 virtual bool CreateRenderViewForRenderManager(
65 RenderViewHost* render_view_host, 62 RenderViewHost* render_view_host,
66 int opener_route_id, 63 int opener_route_id,
64 int proxy_routing_id,
67 CrossProcessFrameConnector* cross_process_frame_connector) = 0; 65 CrossProcessFrameConnector* cross_process_frame_connector) = 0;
68 virtual void BeforeUnloadFiredFromRenderManager( 66 virtual void BeforeUnloadFiredFromRenderManager(
69 bool proceed, const base::TimeTicks& proceed_time, 67 bool proceed, const base::TimeTicks& proceed_time,
70 bool* proceed_to_fire_unload) = 0; 68 bool* proceed_to_fire_unload) = 0;
71 virtual void RenderProcessGoneFromRenderManager( 69 virtual void RenderProcessGoneFromRenderManager(
72 RenderViewHost* render_view_host) = 0; 70 RenderViewHost* render_view_host) = 0;
73 virtual void UpdateRenderViewSizeForRenderManager() = 0; 71 virtual void UpdateRenderViewSizeForRenderManager() = 0;
74 virtual void CancelModalDialogsForRenderManager() = 0; 72 virtual void CancelModalDialogsForRenderManager() = 0;
75 virtual void NotifySwappedFromRenderManager( 73 virtual void NotifySwappedFromRenderManager(
76 RenderViewHost* old_host, RenderViewHost* new_host) = 0; 74 RenderViewHost* old_host, RenderViewHost* new_host) = 0;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 int view_routing_id, 368 int view_routing_id,
371 int frame_routing_id, 369 int frame_routing_id,
372 bool swapped_out, 370 bool swapped_out,
373 bool hidden); 371 bool hidden);
374 372
375 // Sets up the necessary state for a new RenderViewHost with the given opener, 373 // Sets up the necessary state for a new RenderViewHost with the given opener,
376 // if necessary. Returns early if the RenderViewHost has already been 374 // if necessary. Returns early if the RenderViewHost has already been
377 // initialized for another RenderFrameHost. 375 // initialized for another RenderFrameHost.
378 // TODO(creis): opener_route_id is currently for the RenderViewHost but should 376 // TODO(creis): opener_route_id is currently for the RenderViewHost but should
379 // be for the RenderFrame, since frames can have openers. 377 // be for the RenderFrame, since frames can have openers.
380 bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id); 378 bool InitRenderView(RenderViewHost* render_view_host,
379 int opener_route_id,
380 int proxy_routing_id);
Charlie Reis 2014/05/15 00:32:50 It's a bit unclear what this is for. Perhaps a co
nasko 2014/05/15 18:47:13 Done.
381 381
382 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this 382 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this
383 // doesn't require the pending render_frame_host_ pointer to be non-NULL, 383 // doesn't require the pending render_frame_host_ pointer to be non-NULL,
384 // since there could be Web UI switching as well. Call this for every commit. 384 // since there could be Web UI switching as well. Call this for every commit.
385 void CommitPending(); 385 void CommitPending();
386 386
387 // Shutdown all RenderFrameHosts in a SiteInstance. This is called to shutdown 387 // Shutdown all RenderFrameHosts in a SiteInstance. This is called to shutdown
388 // frames when all the frames in a SiteInstance are confirmed to be swapped 388 // frames when all the frames in a SiteInstance are confirmed to be swapped
389 // out. 389 // out.
390 void ShutdownRenderFrameHostsInSiteInstance(int32 site_instance_id); 390 void ShutdownRenderFrameHostsInSiteInstance(int32 site_instance_id);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 CrossProcessFrameConnector* cross_process_frame_connector_; 469 CrossProcessFrameConnector* cross_process_frame_connector_;
470 470
471 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 471 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
472 472
473 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 473 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
474 }; 474 };
475 475
476 } // namespace content 476 } // namespace content
477 477
478 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 478 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698