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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "content/browser/ssl/ssl_manager.h" 17 #include "content/browser/ssl/ssl_manager.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "content/common/navigation_types.h" 19 #include "content/common/navigation_types.h"
20 #include "content/common/page_transition_types.h" 20 #include "content/public/common/page_transition_types.h"
21 21
22 class NavigationEntry; 22 class NavigationEntry;
23 class SessionStorageNamespace; 23 class SessionStorageNamespace;
24 class SiteInstance; 24 class SiteInstance;
25 class TabContents; 25 class TabContents;
26 struct ViewHostMsg_FrameNavigate_Params; 26 struct ViewHostMsg_FrameNavigate_Params;
27 27
28 namespace content { 28 namespace content {
29 class BrowserContext; 29 class BrowserContext;
30 struct LoadCommittedDetails; 30 struct LoadCommittedDetails;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // Returns the transient entry if any. Note that the returned entry is owned 170 // Returns the transient entry if any. Note that the returned entry is owned
171 // by the navigation controller and may be deleted at any time. 171 // by the navigation controller and may be deleted at any time.
172 NavigationEntry* GetTransientEntry() const; 172 NavigationEntry* GetTransientEntry() const;
173 173
174 // New navigations ----------------------------------------------------------- 174 // New navigations -----------------------------------------------------------
175 175
176 // Loads the specified URL, specifying extra http headers to add to the 176 // Loads the specified URL, specifying extra http headers to add to the
177 // request. Extra headers are separated by \n. 177 // request. Extra headers are separated by \n.
178 void LoadURL(const GURL& url, 178 void LoadURL(const GURL& url,
179 const GURL& referrer, 179 const GURL& referrer,
180 PageTransition::Type type, 180 content::PageTransition type,
181 const std::string& extra_headers); 181 const std::string& extra_headers);
182 182
183 // Loads the current page if this NavigationController was restored from 183 // Loads the current page if this NavigationController was restored from
184 // history and the current page has not loaded yet. 184 // history and the current page has not loaded yet.
185 void LoadIfNecessary(); 185 void LoadIfNecessary();
186 186
187 // Renavigation -------------------------------------------------------------- 187 // Renavigation --------------------------------------------------------------
188 188
189 // Navigation relative to the "current entry" 189 // Navigation relative to the "current entry"
190 bool CanGoBack() const; 190 bool CanGoBack() const;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 // Returns true if we are navigating to the URL the tab is opened with. 324 // Returns true if we are navigating to the URL the tab is opened with.
325 bool IsInitialNavigation(); 325 bool IsInitialNavigation();
326 326
327 // Creates navigation entry and translates the virtual url to a real one. 327 // Creates navigation entry and translates the virtual url to a real one.
328 // Used when navigating to a new URL using LoadURL. Extra headers are 328 // Used when navigating to a new URL using LoadURL. Extra headers are
329 // separated by \n. 329 // separated by \n.
330 static NavigationEntry* CreateNavigationEntry( 330 static NavigationEntry* CreateNavigationEntry(
331 const GURL& url, 331 const GURL& url,
332 const GURL& referrer, 332 const GURL& referrer,
333 PageTransition::Type transition, 333 content::PageTransition transition,
334 const std::string& extra_headers, 334 const std::string& extra_headers,
335 content::BrowserContext* browser_context); 335 content::BrowserContext* browser_context);
336 336
337 private: 337 private:
338 class RestoreHelper; 338 class RestoreHelper;
339 friend class RestoreHelper; 339 friend class RestoreHelper;
340 friend class TabContents; // For invoking OnReservedPageIDRange. 340 friend class TabContents; // For invoking OnReservedPageIDRange.
341 341
342 // Classifies the given renderer navigation (see the NavigationType enum). 342 // Classifies the given renderer navigation (see the NavigationType enum).
343 NavigationType::Type ClassifyNavigation( 343 NavigationType::Type ClassifyNavigation(
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 static size_t max_entry_count_; 479 static size_t max_entry_count_;
480 480
481 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), 481 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE),
482 // NO_RELOAD otherwise. 482 // NO_RELOAD otherwise.
483 ReloadType pending_reload_; 483 ReloadType pending_reload_;
484 484
485 DISALLOW_COPY_AND_ASSIGN(NavigationController); 485 DISALLOW_COPY_AND_ASSIGN(NavigationController);
486 }; 486 };
487 487
488 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ 488 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/interstitial_page.cc ('k') | content/browser/tab_contents/navigation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698