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

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

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: address comments from nasko@ Created 5 years, 6 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 <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // to see what it should do. 170 // to see what it should do.
171 virtual bool FocusLocationBarByDefault() = 0; 171 virtual bool FocusLocationBarByDefault() = 0;
172 172
173 // Focuses the location bar. 173 // Focuses the location bar.
174 virtual void SetFocusToLocationBar(bool select_all) = 0; 174 virtual void SetFocusToLocationBar(bool select_all) = 0;
175 175
176 // Returns true if views created for this delegate should be created in a 176 // Returns true if views created for this delegate should be created in a
177 // hidden state. 177 // hidden state.
178 virtual bool IsHidden() = 0; 178 virtual bool IsHidden() = 0;
179 179
180 // Returns the FrameTreeNode id of the outer WebContents that is hosting
181 // this (inner) WebContents.
nasko 2015/06/15 23:00:13 nit: Lots of empty whitespace at end of this line.
lazyboy 2015/06/16 17:59:51 Done.
182 // This FrameTreeNode is the frame that represents this inner WebContents
183 // within the outer WebContents.
nasko 2015/06/15 23:00:13 nit: s/within/within the FrameTree of/
lazyboy 2015/06/16 17:59:51 Done.
184 // Returns FrameTreeNode::FRAME_TREE_NODE_ID_NONE if this WebContents does
185 // not have an outer WebContents.
186 virtual int GetOuterDelegateFrameTreeNodeID() = 0;
187
180 protected: 188 protected:
181 virtual ~Delegate() {} 189 virtual ~Delegate() {}
182 }; 190 };
183 191
184 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown 192 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown
185 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of 193 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of
186 // WebContentsImpl. 194 // WebContentsImpl.
187 static bool ClearRFHsPendingShutdown(FrameTreeNode* node); 195 static bool ClearRFHsPendingShutdown(FrameTreeNode* node);
188 196
189 // All three delegate pointers must be non-NULL and are not owned by this 197 // All three delegate pointers must be non-NULL and are not owned by this
(...skipping 25 matching lines...) Expand all
215 return render_frame_host_.get(); 223 return render_frame_host_.get();
216 } 224 }
217 225
218 // TODO(creis): Remove this when we no longer use RVH for navigation. 226 // TODO(creis): Remove this when we no longer use RVH for navigation.
219 RenderViewHostImpl* current_host() const; 227 RenderViewHostImpl* current_host() const;
220 228
221 // Returns the view associated with the current RenderViewHost, or NULL if 229 // Returns the view associated with the current RenderViewHost, or NULL if
222 // there is no current one. 230 // there is no current one.
223 RenderWidgetHostView* GetRenderWidgetHostView() const; 231 RenderWidgetHostView* GetRenderWidgetHostView() const;
224 232
233 // Returns the RenderWidgetHost of outer WebContents that can be used to fetch
234 // the last keyboard event.
235 // TODO(lazyboy): This can be removed once input events are sent directly to
236 // remote frames.
237 RenderWidgetHostImpl* GetOuterRenderWidgetHostForKeyboardInput();
238
225 RenderFrameProxyHost* GetProxyToParent(); 239 RenderFrameProxyHost* GetProxyToParent();
240 RenderFrameProxyHost* GetProxyToOuterDelegate();
nasko 2015/06/15 23:00:13 nit: Add a small comment to describe what this met
lazyboy 2015/06/16 17:59:51 Done.
241
242 // Returns whether this manager belongs to a FrameTreeNode that is a main
243 // frame in an inner WebContents.
244 //
nasko 2015/06/15 23:00:13 nit: no need for empty line.
lazyboy 2015/06/16 17:59:51 Done.
245 // TODO(lazyboy): Make this work correctly for subframes inside inner
246 // WebContents too.
247 bool ForInnerDelegate();
248
249 // Removes the FrameTreeNode in the outer WebContents that represents this
250 // FrameTreeNode.
251 void RemoveOuterDelegateFrame();
226 252
227 // Returns the pending RenderFrameHost, or NULL if there is no pending one. 253 // Returns the pending RenderFrameHost, or NULL if there is no pending one.
228 RenderFrameHostImpl* pending_frame_host() const { 254 RenderFrameHostImpl* pending_frame_host() const {
229 return pending_render_frame_host_.get(); 255 return pending_render_frame_host_.get();
230 } 256 }
231 257
232 // Returns the speculative RenderFrameHost, or null if there is no speculative 258 // Returns the speculative RenderFrameHost, or null if there is no speculative
233 // one. 259 // one.
234 RenderFrameHostImpl* speculative_frame_host_for_testing() const { 260 RenderFrameHostImpl* speculative_frame_host_for_testing() const {
235 return speculative_render_frame_host_.get(); 261 return speculative_render_frame_host_.get();
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 void OnDidUpdateName(const std::string& name); 441 void OnDidUpdateName(const std::string& name);
416 442
417 // Send updated origin to all frame proxies when the frame navigates to a new 443 // Send updated origin to all frame proxies when the frame navigates to a new
418 // origin. 444 // origin.
419 void OnDidUpdateOrigin(const url::Origin& origin); 445 void OnDidUpdateOrigin(const url::Origin& origin);
420 446
421 void EnsureRenderViewInitialized(FrameTreeNode* source, 447 void EnsureRenderViewInitialized(FrameTreeNode* source,
422 RenderViewHostImpl* render_view_host, 448 RenderViewHostImpl* render_view_host,
423 SiteInstance* instance); 449 SiteInstance* instance);
424 450
451 // Called on the RFHM of the inner WebContents to create a proxy for this
nasko 2015/06/15 23:00:13 nit: s/proxy/RenderFrameProxyHost/
lazyboy 2015/06/16 17:59:51 Done.
452 // inner WebContents's frame in its outer WebContents's process.
nasko 2015/06/15 23:00:13 nit: s/process/SiteInstance/. Also, the SiteInstan
lazyboy 2015/06/16 17:59:51 Done.
453 void CreateOuterDelegateProxy(SiteInstance* outer_contents_site_instance,
454 RenderFrameHostImpl* render_frame_host);
455
456 // Sets the child RWHV for this frame, which much be part of an inner
nasko 2015/06/15 23:00:13 nit: s/RWHV/RenderWidgetHostView/
lazyboy 2015/06/16 17:59:51 Done.
457 // WebContents.
458 void SetRWHViewForInnerContents(RenderWidgetHostView* child_rwhv);
459
425 private: 460 private:
426 friend class FrameTreeVisualizer; 461 friend class FrameTreeVisualizer;
427 friend class NavigatorTestWithBrowserSideNavigation; 462 friend class NavigatorTestWithBrowserSideNavigation;
428 friend class RenderFrameHostManagerTest; 463 friend class RenderFrameHostManagerTest;
429 friend class TestWebContents; 464 friend class TestWebContents;
430 465
431 // Stores information regarding a SiteInstance targeted at a specific URL to 466 // Stores information regarding a SiteInstance targeted at a specific URL to
432 // allow for comparisons without having to actually create new instances. It 467 // allow for comparisons without having to actually create new instances. It
433 // can point to an existing one or store the details needed to create a new 468 // can point to an existing one or store the details needed to create a new
434 // one. 469 // one.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 bool should_reuse_web_ui_; 769 bool should_reuse_web_ui_;
735 770
736 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 771 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
737 772
738 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 773 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
739 }; 774 };
740 775
741 } // namespace content 776 } // namespace content
742 777
743 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 778 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698