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

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

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Misc fixes Created 7 years 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 //
138 // TODO(creis): Change RenderViewHost to RenderFrameHost.
139 bool RendererDidNavigate(RenderViewHost* rvh,
140 const ViewHostMsg_FrameNavigate_Params& params,
141 LoadCommittedDetails* details);
142
143 // DEPRECATED: Use the version above instead.
137 bool RendererDidNavigate(const ViewHostMsg_FrameNavigate_Params& params, 144 bool RendererDidNavigate(const ViewHostMsg_FrameNavigate_Params& params,
138 LoadCommittedDetails* details); 145 LoadCommittedDetails* details) {
146 return RendererDidNavigate(delegate_->GetRenderViewHost(), params, details);
147 }
139 148
140 // Notifies us that we just became active. This is used by the WebContentsImpl 149 // 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. 150 // so that we know to load URLs that were pending as "lazy" loads.
142 void SetActive(bool is_active); 151 void SetActive(bool is_active);
143 152
144 // Returns true if the given URL would be an in-page navigation (i.e. only 153 // 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 154 // 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 155 // 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 156 // pending and in page navigations only happen on committed pages. If there
148 // is no last committed entry, then nothing will be in-page. 157 // is no last committed entry, then nothing will be in-page.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 233
225 private: 234 private:
226 // |low_water_mark_| is the first time in a sequence of adjusted 235 // |low_water_mark_| is the first time in a sequence of adjusted
227 // times and |high_water_mark_| is the last. 236 // times and |high_water_mark_| is the last.
228 base::Time low_water_mark_; 237 base::Time low_water_mark_;
229 base::Time high_water_mark_; 238 base::Time high_water_mark_;
230 }; 239 };
231 240
232 // Classifies the given renderer navigation (see the NavigationType enum). 241 // Classifies the given renderer navigation (see the NavigationType enum).
233 NavigationType ClassifyNavigation( 242 NavigationType ClassifyNavigation(
243 RenderViewHost* rvh,
234 const ViewHostMsg_FrameNavigate_Params& params) const; 244 const ViewHostMsg_FrameNavigate_Params& params) const;
235 245
236 // Causes the controller to load the specified entry. The function assumes 246 // Causes the controller to load the specified entry. The function assumes
237 // ownership of the pointer since it is put in the navigation list. 247 // ownership of the pointer since it is put in the navigation list.
238 // NOTE: Do not pass an entry that the controller already owns! 248 // NOTE: Do not pass an entry that the controller already owns!
239 void LoadEntry(NavigationEntryImpl* entry); 249 void LoadEntry(NavigationEntryImpl* entry);
240 250
241 // Handlers for the different types of navigation types. They will actually 251 // Handlers for the different types of navigation types. They will actually
242 // handle the navigations corresponding to the different NavClasses above. 252 // handle the navigations corresponding to the different NavClasses above.
243 // They will NOT broadcast the commit notification, that should be handled by 253 // They will NOT broadcast the commit notification, that should be handled by
244 // the caller. 254 // the caller.
245 // 255 //
246 // RendererDidNavigateAutoSubframe is special, it may not actually change 256 // RendererDidNavigateAutoSubframe is special, it may not actually change
247 // anything if some random subframe is loaded. It will return true if anything 257 // anything if some random subframe is loaded. It will return true if anything
248 // changed, or false if not. 258 // changed, or false if not.
249 // 259 //
250 // The functions taking |did_replace_entry| will fill into the given variable 260 // The functions taking |did_replace_entry| will fill into the given variable
251 // whether the last entry has been replaced or not. 261 // whether the last entry has been replaced or not.
252 // See LoadCommittedDetails.did_replace_entry. 262 // See LoadCommittedDetails.did_replace_entry.
263 //
264 // TODO(creis): Change RenderViewHost to RenderFrameHost.
253 void RendererDidNavigateToNewPage( 265 void RendererDidNavigateToNewPage(
254 const ViewHostMsg_FrameNavigate_Params& params, bool replace_entry); 266 RenderViewHost* rvh,
267 const ViewHostMsg_FrameNavigate_Params& params,
268 bool replace_entry);
255 void RendererDidNavigateToExistingPage( 269 void RendererDidNavigateToExistingPage(
270 RenderViewHost* rvh,
256 const ViewHostMsg_FrameNavigate_Params& params); 271 const ViewHostMsg_FrameNavigate_Params& params);
257 void RendererDidNavigateToSamePage( 272 void RendererDidNavigateToSamePage(
273 RenderViewHost* rvh,
258 const ViewHostMsg_FrameNavigate_Params& params); 274 const ViewHostMsg_FrameNavigate_Params& params);
259 void RendererDidNavigateInPage( 275 void RendererDidNavigateInPage(
260 const ViewHostMsg_FrameNavigate_Params& params, bool* did_replace_entry); 276 RenderViewHost* rvh,
277 const ViewHostMsg_FrameNavigate_Params& params,
278 bool* did_replace_entry);
261 void RendererDidNavigateNewSubframe( 279 void RendererDidNavigateNewSubframe(
280 RenderViewHost* rvh,
262 const ViewHostMsg_FrameNavigate_Params& params); 281 const ViewHostMsg_FrameNavigate_Params& params);
263 bool RendererDidNavigateAutoSubframe( 282 bool RendererDidNavigateAutoSubframe(
283 RenderViewHost* rvh,
264 const ViewHostMsg_FrameNavigate_Params& params); 284 const ViewHostMsg_FrameNavigate_Params& params);
265 285
266 // Helper function for code shared between Reload() and ReloadIgnoringCache(). 286 // Helper function for code shared between Reload() and ReloadIgnoringCache().
267 void ReloadInternal(bool check_for_repost, ReloadType reload_type); 287 void ReloadInternal(bool check_for_repost, ReloadType reload_type);
268 288
269 // Actually issues the navigation held in pending_entry. 289 // Actually issues the navigation held in pending_entry.
270 void NavigateToPendingEntry(ReloadType reload_type); 290 void NavigateToPendingEntry(ReloadType reload_type);
271 291
272 // Allows the derived class to issue notifications that a load has been 292 // 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. 293 // 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_; 419 TimeSmoother time_smoother_;
400 420
401 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; 421 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_;
402 422
403 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 423 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
404 }; 424 };
405 425
406 } // namespace content 426 } // namespace content
407 427
408 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 428 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_delegate.h ('k') | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698