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

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

Issue 892123002: PlzNavigate: change behavior when navigating with a non-live RFH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test not checking for pending/speculative WebUI. Created 5 years, 10 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 // Returns the current committed Web UI or NULL if none applies. 228 // Returns the current committed Web UI or NULL if none applies.
229 WebUIImpl* web_ui() const { return web_ui_.get(); } 229 WebUIImpl* web_ui() const { return web_ui_.get(); }
230 230
231 // Returns the Web UI for the pending navigation, or NULL of none applies. 231 // Returns the Web UI for the pending navigation, or NULL of none applies.
232 WebUIImpl* pending_web_ui() const { 232 WebUIImpl* pending_web_ui() const {
233 return pending_web_ui_.get() ? pending_web_ui_.get() : 233 return pending_web_ui_.get() ? pending_web_ui_.get() :
234 pending_and_current_web_ui_.get(); 234 pending_and_current_web_ui_.get();
235 } 235 }
236 236
237 // PlzNavigate
238 // Returns the speculative Web UI for the navigation, or nullptr of none
239 // applies.
240 WebUIImpl* speculative_web_ui() const {
nasko 2015/02/02 21:20:40 nit: Since this is used only in tests, let's add a
carlosk 2015/02/03 10:06:26 Done.
241 return should_reuse_web_ui_ ? web_ui_.get() : speculative_web_ui_.get();
nasko 2015/02/02 21:20:40 Should the regular web_ui_ be returned in a method
carlosk 2015/02/03 10:06:26 Yes when |should_reuse_web_ui_| is true. It is the
clamy 2015/02/03 10:59:11 Maybe you could precise this in the comment?
carlosk 2015/02/04 11:03:25 Done.
242 }
243
237 // Called when we want to instruct the renderer to navigate to the given 244 // Called when we want to instruct the renderer to navigate to the given
238 // navigation entry. It may create a new RenderFrameHost or re-use an existing 245 // navigation entry. It may create a new RenderFrameHost or re-use an existing
239 // one. The RenderFrameHost to navigate will be returned. Returns NULL if one 246 // one. The RenderFrameHost to navigate will be returned. Returns NULL if one
240 // could not be created. 247 // could not be created.
241 RenderFrameHostImpl* Navigate(const NavigationEntryImpl& entry); 248 RenderFrameHostImpl* Navigate(const NavigationEntryImpl& entry);
242 249
243 // Instructs the various live views to stop. Called when the user directed the 250 // Instructs the various live views to stop. Called when the user directed the
244 // page to stop loading. 251 // page to stop loading.
245 void Stop(); 252 void Stop();
246 253
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 bool should_reuse_web_ui_; 680 bool should_reuse_web_ui_;
674 681
675 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 682 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
676 683
677 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 684 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
678 }; 685 };
679 686
680 } // namespace content 687 } // namespace content
681 688
682 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 689 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698