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

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

Issue 118443008: Support cross-process navigations in a single subframe RenderFrameHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor cleanup Created 6 years, 12 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_NAVIGATION_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Handles updating the navigation state after the renderer has navigated. 127 // Handles updating the navigation state after the renderer has navigated.
128 // This is used by the WebContentsImpl. 128 // This is used by the WebContentsImpl.
129 // 129 //
130 // If a new entry is created, it will return true and will have filled the 130 // If a new entry is created, it will return true and will have filled the
131 // given details structure and broadcast the NOTIFY_NAV_ENTRY_COMMITTED 131 // given details structure and broadcast the NOTIFY_NAV_ENTRY_COMMITTED
132 // notification. The caller can then use the details without worrying about 132 // notification. The caller can then use the details without worrying about
133 // listening for the notification. 133 // listening for the notification.
134 // 134 //
135 // In the case that nothing has changed, the details structure is undefined 135 // In the case that nothing has changed, the details structure is undefined
136 // and it will return false. 136 // and it will return false.
137 bool RendererDidNavigate(const ViewHostMsg_FrameNavigate_Params& params, 137 //
138 // TODO(creis): Change RenderViewHost to RenderFrameHost.
139 bool RendererDidNavigate(RenderViewHost* rvh,
Charlie Reis 2013/12/20 23:20:08 If you want, these changes to NavigationController
140 const ViewHostMsg_FrameNavigate_Params& params,
138 LoadCommittedDetails* details); 141 LoadCommittedDetails* details);
139 142
140 // Notifies us that we just became active. This is used by the WebContentsImpl 143 // Notifies us that we just became active. This is used by the WebContentsImpl
141 // so that we know to load URLs that were pending as "lazy" loads. 144 // so that we know to load URLs that were pending as "lazy" loads.
142 void SetActive(bool is_active); 145 void SetActive(bool is_active);
143 146
144 // Returns true if the given URL would be an in-page navigation (i.e. only 147 // Returns true if the given URL would be an in-page navigation (i.e. only
145 // the reference fragment is different) from the "last committed entry". We do 148 // the reference fragment is different) from the "last committed entry". We do
146 // not compare it against the "active entry" since the active entry can be 149 // not compare it against the "active entry" since the active entry can be
147 // pending and in page navigations only happen on committed pages. If there 150 // pending and in page navigations only happen on committed pages. If there
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 227
225 private: 228 private:
226 // |low_water_mark_| is the first time in a sequence of adjusted 229 // |low_water_mark_| is the first time in a sequence of adjusted
227 // times and |high_water_mark_| is the last. 230 // times and |high_water_mark_| is the last.
228 base::Time low_water_mark_; 231 base::Time low_water_mark_;
229 base::Time high_water_mark_; 232 base::Time high_water_mark_;
230 }; 233 };
231 234
232 // Classifies the given renderer navigation (see the NavigationType enum). 235 // Classifies the given renderer navigation (see the NavigationType enum).
233 NavigationType ClassifyNavigation( 236 NavigationType ClassifyNavigation(
237 RenderViewHost* rvh,
234 const ViewHostMsg_FrameNavigate_Params& params) const; 238 const ViewHostMsg_FrameNavigate_Params& params) const;
235 239
236 // Causes the controller to load the specified entry. The function assumes 240 // Causes the controller to load the specified entry. The function assumes
237 // ownership of the pointer since it is put in the navigation list. 241 // ownership of the pointer since it is put in the navigation list.
238 // NOTE: Do not pass an entry that the controller already owns! 242 // NOTE: Do not pass an entry that the controller already owns!
239 void LoadEntry(NavigationEntryImpl* entry); 243 void LoadEntry(NavigationEntryImpl* entry);
240 244
241 // Handlers for the different types of navigation types. They will actually 245 // Handlers for the different types of navigation types. They will actually
242 // handle the navigations corresponding to the different NavClasses above. 246 // handle the navigations corresponding to the different NavClasses above.
243 // They will NOT broadcast the commit notification, that should be handled by 247 // They will NOT broadcast the commit notification, that should be handled by
244 // the caller. 248 // the caller.
245 // 249 //
246 // RendererDidNavigateAutoSubframe is special, it may not actually change 250 // RendererDidNavigateAutoSubframe is special, it may not actually change
247 // anything if some random subframe is loaded. It will return true if anything 251 // anything if some random subframe is loaded. It will return true if anything
248 // changed, or false if not. 252 // changed, or false if not.
249 // 253 //
250 // The functions taking |did_replace_entry| will fill into the given variable 254 // The functions taking |did_replace_entry| will fill into the given variable
251 // whether the last entry has been replaced or not. 255 // whether the last entry has been replaced or not.
252 // See LoadCommittedDetails.did_replace_entry. 256 // See LoadCommittedDetails.did_replace_entry.
257 //
258 // TODO(creis): Change RenderViewHost to RenderFrameHost.
253 void RendererDidNavigateToNewPage( 259 void RendererDidNavigateToNewPage(
254 const ViewHostMsg_FrameNavigate_Params& params, bool replace_entry); 260 RenderViewHost* rvh,
261 const ViewHostMsg_FrameNavigate_Params& params,
262 bool replace_entry);
255 void RendererDidNavigateToExistingPage( 263 void RendererDidNavigateToExistingPage(
264 RenderViewHost* rvh,
256 const ViewHostMsg_FrameNavigate_Params& params); 265 const ViewHostMsg_FrameNavigate_Params& params);
257 void RendererDidNavigateToSamePage( 266 void RendererDidNavigateToSamePage(
267 RenderViewHost* rvh,
258 const ViewHostMsg_FrameNavigate_Params& params); 268 const ViewHostMsg_FrameNavigate_Params& params);
259 void RendererDidNavigateInPage( 269 void RendererDidNavigateInPage(
260 const ViewHostMsg_FrameNavigate_Params& params, bool* did_replace_entry); 270 RenderViewHost* rvh,
271 const ViewHostMsg_FrameNavigate_Params& params,
272 bool* did_replace_entry);
261 void RendererDidNavigateNewSubframe( 273 void RendererDidNavigateNewSubframe(
274 RenderViewHost* rvh,
262 const ViewHostMsg_FrameNavigate_Params& params); 275 const ViewHostMsg_FrameNavigate_Params& params);
263 bool RendererDidNavigateAutoSubframe( 276 bool RendererDidNavigateAutoSubframe(
277 RenderViewHost* rvh,
264 const ViewHostMsg_FrameNavigate_Params& params); 278 const ViewHostMsg_FrameNavigate_Params& params);
265 279
266 // Helper function for code shared between Reload() and ReloadIgnoringCache(). 280 // Helper function for code shared between Reload() and ReloadIgnoringCache().
267 void ReloadInternal(bool check_for_repost, ReloadType reload_type); 281 void ReloadInternal(bool check_for_repost, ReloadType reload_type);
268 282
269 // Actually issues the navigation held in pending_entry. 283 // Actually issues the navigation held in pending_entry.
270 void NavigateToPendingEntry(ReloadType reload_type); 284 void NavigateToPendingEntry(ReloadType reload_type);
271 285
272 // Allows the derived class to issue notifications that a load has been 286 // Allows the derived class to issue notifications that a load has been
273 // committed. This will fill in the active entry to the details structure. 287 // committed. This will fill in the active entry to the details structure.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 TimeSmoother time_smoother_; 413 TimeSmoother time_smoother_;
400 414
401 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; 415 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_;
402 416
403 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 417 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
404 }; 418 };
405 419
406 } // namespace content 420 } // namespace content
407 421
408 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 422 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698