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

Side by Side Diff: content/browser/tab_contents/navigation_controller.h

Issue 7791029: When the user navigates to the home page, make sure to set the RLZ string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // Note that adding a transient entry does not change the active contents. 157 // Note that adding a transient entry does not change the active contents.
158 void AddTransientEntry(NavigationEntry* entry); 158 void AddTransientEntry(NavigationEntry* entry);
159 159
160 // Returns the transient entry if any. Note that the returned entry is owned 160 // Returns the transient entry if any. Note that the returned entry is owned
161 // by the navigation controller and may be deleted at any time. 161 // by the navigation controller and may be deleted at any time.
162 NavigationEntry* GetTransientEntry() const; 162 NavigationEntry* GetTransientEntry() const;
163 163
164 // New navigations ----------------------------------------------------------- 164 // New navigations -----------------------------------------------------------
165 165
166 // Loads the specified URL. 166 // Loads the specified URL.
167 void LoadURL(const GURL& url, const GURL& referrer, 167 void LoadURL(const GURL& url, const GURL& referrer,
sky 2011/08/30 17:05:25 Nuke this one in favor of new. I'm fine with doing
Roger Tawa OOO till Jul 10th 2011/08/30 18:58:32 I'll do it as part of this CL. It will create a l
168 PageTransition::Type type); 168 PageTransition::Type type);
169 169
170 // Loads the specified URL, specifying extra http headers to add to the
171 // request. Extra headers are separated by \n.
172 void LoadURLWithHeaders(const GURL& url, const GURL& referrer,
sky 2011/08/30 17:05:25 each param on its own line.
Roger Tawa OOO till Jul 10th 2011/08/30 18:58:32 Done.
173 PageTransition::Type type, const std::string& extra_headers);
174
170 // Loads the current page if this NavigationController was restored from 175 // Loads the current page if this NavigationController was restored from
171 // history and the current page has not loaded yet. 176 // history and the current page has not loaded yet.
172 void LoadIfNecessary(); 177 void LoadIfNecessary();
173 178
174 // Renavigation -------------------------------------------------------------- 179 // Renavigation --------------------------------------------------------------
175 180
176 // Navigation relative to the "current entry" 181 // Navigation relative to the "current entry"
177 bool CanGoBack() const; 182 bool CanGoBack() const;
178 bool CanGoForward() const; 183 bool CanGoForward() const;
179 void GoBack(); 184 void GoBack();
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 316
312 // Cancels a repost that brought up a warning. 317 // Cancels a repost that brought up a warning.
313 void CancelPendingReload(); 318 void CancelPendingReload();
314 // Continues a repost that brought up a warning. 319 // Continues a repost that brought up a warning.
315 void ContinuePendingReload(); 320 void ContinuePendingReload();
316 321
317 // Returns true if we are navigating to the URL the tab is opened with. 322 // Returns true if we are navigating to the URL the tab is opened with.
318 bool IsInitialNavigation(); 323 bool IsInitialNavigation();
319 324
320 // Creates navigation entry and translates the virtual url to a real one. 325 // Creates navigation entry and translates the virtual url to a real one.
321 // Used when navigating to a new URL using LoadURL. 326 // Used when navigating to a new URL using LoadURL. Extra headers are
327 // separated by \n.
322 static NavigationEntry* CreateNavigationEntry( 328 static NavigationEntry* CreateNavigationEntry(
323 const GURL& url, 329 const GURL& url,
324 const GURL& referrer, 330 const GURL& referrer,
325 PageTransition::Type transition, 331 PageTransition::Type transition,
332 const std::string& extra_headers,
326 content::BrowserContext* browser_context); 333 content::BrowserContext* browser_context);
327 334
328 private: 335 private:
329 class RestoreHelper; 336 class RestoreHelper;
330 friend class RestoreHelper; 337 friend class RestoreHelper;
331 friend class TabContents; // For invoking OnReservedPageIDRange. 338 friend class TabContents; // For invoking OnReservedPageIDRange.
332 339
333 // Classifies the given renderer navigation (see the NavigationType enum). 340 // Classifies the given renderer navigation (see the NavigationType enum).
334 NavigationType::Type ClassifyNavigation( 341 NavigationType::Type ClassifyNavigation(
335 const ViewHostMsg_FrameNavigate_Params& params) const; 342 const ViewHostMsg_FrameNavigate_Params& params) const;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 static size_t max_entry_count_; 477 static size_t max_entry_count_;
471 478
472 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), 479 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE),
473 // NO_RELOAD otherwise. 480 // NO_RELOAD otherwise.
474 ReloadType pending_reload_; 481 ReloadType pending_reload_;
475 482
476 DISALLOW_COPY_AND_ASSIGN(NavigationController); 483 DISALLOW_COPY_AND_ASSIGN(NavigationController);
477 }; 484 };
478 485
479 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ 486 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698