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

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

Issue 270883003: Decouple RVH creation from CrossProcessFrameConnector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // 61 //
62 // If you are attaching to an already-existing RenderView, you should call 62 // If you are attaching to an already-existing RenderView, you should call
63 // InitWithExistingID. 63 // InitWithExistingID.
64 virtual bool CreateRenderViewForRenderManager( 64 virtual bool CreateRenderViewForRenderManager(
65 RenderViewHost* render_view_host, 65 RenderViewHost* render_view_host,
66 int opener_route_id, 66 int opener_route_id,
67 CrossProcessFrameConnector* cross_process_frame_connector) = 0; 67 bool for_subframe) = 0;
68 virtual void BeforeUnloadFiredFromRenderManager( 68 virtual void BeforeUnloadFiredFromRenderManager(
69 bool proceed, const base::TimeTicks& proceed_time, 69 bool proceed, const base::TimeTicks& proceed_time,
70 bool* proceed_to_fire_unload) = 0; 70 bool* proceed_to_fire_unload) = 0;
71 virtual void RenderProcessGoneFromRenderManager( 71 virtual void RenderProcessGoneFromRenderManager(
72 RenderViewHost* render_view_host) = 0; 72 RenderViewHost* render_view_host) = 0;
73 virtual void UpdateRenderViewSizeForRenderManager() = 0; 73 virtual void UpdateRenderViewSizeForRenderManager() = 0;
74 virtual void CancelModalDialogsForRenderManager() = 0; 74 virtual void CancelModalDialogsForRenderManager() = 0;
75 virtual void NotifySwappedFromRenderManager( 75 virtual void NotifySwappedFromRenderManager(
76 RenderViewHost* old_host, RenderViewHost* new_host) = 0; 76 RenderViewHost* old_host, RenderViewHost* new_host) = 0;
77 virtual NavigationControllerImpl& 77 virtual NavigationControllerImpl&
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 int view_routing_id, 373 int view_routing_id,
374 int frame_routing_id, 374 int frame_routing_id,
375 bool swapped_out, 375 bool swapped_out,
376 bool hidden); 376 bool hidden);
377 377
378 // Sets up the necessary state for a new RenderViewHost with the given opener, 378 // Sets up the necessary state for a new RenderViewHost with the given opener,
379 // if necessary. Returns early if the RenderViewHost has already been 379 // if necessary. Returns early if the RenderViewHost has already been
380 // initialized for another RenderFrameHost. 380 // initialized for another RenderFrameHost.
381 // TODO(creis): opener_route_id is currently for the RenderViewHost but should 381 // TODO(creis): opener_route_id is currently for the RenderViewHost but should
382 // be for the RenderFrame, since frames can have openers. 382 // be for the RenderFrame, since frames can have openers.
383 bool InitRenderView(RenderViewHost* render_view_host, int opener_route_id); 383 bool InitRenderView(RenderViewHost* render_view_host,
384 int opener_route_id,
385 bool for_subframe);
384 386
385 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this 387 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this
386 // doesn't require the pending render_frame_host_ pointer to be non-NULL, 388 // doesn't require the pending render_frame_host_ pointer to be non-NULL,
387 // since there could be Web UI switching as well. Call this for every commit. 389 // since there could be Web UI switching as well. Call this for every commit.
388 void CommitPending(); 390 void CommitPending();
389 391
390 // Shutdown all RenderFrameHosts in a SiteInstance. This is called to shutdown 392 // Shutdown all RenderFrameHosts in a SiteInstance. This is called to shutdown
391 // frames when all the frames in a SiteInstance are confirmed to be swapped 393 // frames when all the frames in a SiteInstance are confirmed to be swapped
392 // out. 394 // out.
393 void ShutdownRenderFrameHostsInSiteInstance(int32 site_instance_id); 395 void ShutdownRenderFrameHostsInSiteInstance(int32 site_instance_id);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 CrossProcessFrameConnector* cross_process_frame_connector_; 474 CrossProcessFrameConnector* cross_process_frame_connector_;
473 475
474 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 476 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
475 477
476 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 478 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
477 }; 479 };
478 480
479 } // namespace content 481 } // namespace content
480 482
481 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 483 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698