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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.h

Issue 23841002: Create a new RenderFrameHost per child frame when --site-per-process is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and add some comments. Created 7 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, 455 static void FilterURL(ChildProcessSecurityPolicyImpl* policy,
456 const RenderProcessHost* process, 456 const RenderProcessHost* process,
457 bool empty_allowed, 457 bool empty_allowed,
458 GURL* url); 458 GURL* url);
459 459
460 // NOTE: Do not add functions that just send an IPC message that are called in 460 // NOTE: Do not add functions that just send an IPC message that are called in
461 // one or two places. Have the caller send the IPC message directly (unless 461 // one or two places. Have the caller send the IPC message directly (unless
462 // the caller places are in different platforms, in which case it's better 462 // the caller places are in different platforms, in which case it's better
463 // to keep them consistent). 463 // to keep them consistent).
464 464
465 // Called to associate this RenderViewHost with the FrameTree given at
466 // construction. See comment about |main_render_frame_host_| for details.
467 void SwapIntoFrameTree(RenderViewHostImpl* old_render_view_host);
Charlie Reis 2013/09/11 22:25:04 I'm having trouble with this contract. I guess it
468
465 protected: 469 protected:
466 friend class RenderViewHostObserver; 470 friend class RenderViewHostObserver;
467 471
468 // Add and remove observers for filtering IPC messages. Clients must be sure 472 // Add and remove observers for filtering IPC messages. Clients must be sure
469 // to remove the observer before they go away. 473 // to remove the observer before they go away.
470 void AddObserver(RenderViewHostObserver* observer); 474 void AddObserver(RenderViewHostObserver* observer);
471 void RemoveObserver(RenderViewHostObserver* observer); 475 void RemoveObserver(RenderViewHostObserver* observer);
472 476
473 // RenderWidgetHost protected overrides. 477 // RenderWidgetHost protected overrides.
474 virtual void OnUserGesture() OVERRIDE; 478 virtual void OnUserGesture() OVERRIDE;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 // TODO(nasko): Remove this accessor once RenderFrameHost moves into the frame 595 // TODO(nasko): Remove this accessor once RenderFrameHost moves into the frame
592 // tree. 596 // tree.
593 RenderFrameHostImpl* main_render_frame_host() const; 597 RenderFrameHostImpl* main_render_frame_host() const;
594 598
595 // Sets whether this RenderViewHost is swapped out in favor of another, 599 // Sets whether this RenderViewHost is swapped out in favor of another,
596 // and clears any waiting state that is no longer relevant. 600 // and clears any waiting state that is no longer relevant.
597 void SetSwappedOut(bool is_swapped_out); 601 void SetSwappedOut(bool is_swapped_out);
598 602
599 bool CanAccessFilesOfPageState(const PageState& state) const; 603 bool CanAccessFilesOfPageState(const PageState& state) const;
600 604
601 // This is an RenderFrameHost object associated with the top-level frame in 605 // All RenderViewHosts must have a RenderFrameHost for its main frame
602 // the page rendered by this RenderViewHost. 606 // thus the RenderFrameHost is created in lock step on construction.
603 // TODO(nasko): Remove this pointer once we have enough infrastructure to 607 // In a WebContents, the FrameTree owns the RenderFrameHost and ownership
604 // move this to the top-level FrameTreeNode. 608 // is transfered once this RenderViewHost commits.
Charlie Reis 2013/09/11 22:25:04 Is this a temporary thing, such that we should hav
Charlie Reis 2013/09/24 18:25:58 Done.
609 //
610 // For standalone RenderViewHosts such as those used by interstitial pages,
nasko 2013/09/11 22:26:24 I wonder if this is going to be true long term. It
611 // this is the sole reference because there is no FrameTree. Also, when the
Charlie Reis 2013/09/11 22:25:04 I don't think this makes sense. Interstitial page
612 // RenderViewHost swaps out, the reference is given back so it can be held in
613 // the swapped out state.
605 scoped_ptr<RenderFrameHostImpl> main_render_frame_host_; 614 scoped_ptr<RenderFrameHostImpl> main_render_frame_host_;
606 615
607 // Our delegate, which wants to know about changes in the RenderView. 616 // Our delegate, which wants to know about changes in the RenderView.
608 RenderViewHostDelegate* delegate_; 617 RenderViewHostDelegate* delegate_;
609 618
610 // The SiteInstance associated with this RenderViewHost. All pages drawn 619 // The SiteInstance associated with this RenderViewHost. All pages drawn
611 // in this RenderViewHost are part of this SiteInstance. Should not change 620 // in this RenderViewHost are part of this SiteInstance. Should not change
612 // over time. 621 // over time.
613 scoped_refptr<SiteInstanceImpl> instance_; 622 scoped_refptr<SiteInstanceImpl> instance_;
614 623
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); 720 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
712 }; 721 };
713 722
714 #if defined(COMPILER_MSVC) 723 #if defined(COMPILER_MSVC)
715 #pragma warning(pop) 724 #pragma warning(pop)
716 #endif 725 #endif
717 726
718 } // namespace content 727 } // namespace content
719 728
720 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 729 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698