| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 10 #include <string> | 11 #include <string> |
| 11 | 12 |
| 12 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 18 #include "content/public/common/page_type.h" | 18 #include "content/public/common/page_type.h" |
| 19 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
| 20 #include "ui/base/page_transition_types.h" | 20 #include "ui/base/page_transition_types.h" |
| 21 | 21 |
| 22 class GURL; | 22 class GURL; |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 class PageState; | 26 class PageState; |
| 27 struct FaviconStatus; | 27 struct FaviconStatus; |
| 28 struct SSLStatus; | 28 struct SSLStatus; |
| 29 | 29 |
| 30 // A NavigationEntry is a data structure that captures all the information | 30 // A NavigationEntry is a data structure that captures all the information |
| 31 // required to recreate a browsing state. This includes some opaque binary | 31 // required to recreate a browsing state. This includes some opaque binary |
| 32 // state as provided by the WebContents as well as some clear text title and | 32 // state as provided by the WebContents as well as some clear text title and |
| 33 // URL which is used for our user interface. | 33 // URL which is used for our user interface. |
| 34 class NavigationEntry { | 34 class NavigationEntry { |
| 35 public: | 35 public: |
| 36 virtual ~NavigationEntry() {} | 36 virtual ~NavigationEntry() {} |
| 37 | 37 |
| 38 CONTENT_EXPORT static scoped_ptr<NavigationEntry> Create(); | 38 CONTENT_EXPORT static std::unique_ptr<NavigationEntry> Create(); |
| 39 | 39 |
| 40 // Page-related stuff -------------------------------------------------------- | 40 // Page-related stuff -------------------------------------------------------- |
| 41 | 41 |
| 42 // A unique ID is preserved across commits and redirects, which means that | 42 // A unique ID is preserved across commits and redirects, which means that |
| 43 // sometimes a NavigationEntry's unique ID needs to be set (e.g. when | 43 // sometimes a NavigationEntry's unique ID needs to be set (e.g. when |
| 44 // creating a committed entry to correspond to a to-be-deleted pending entry, | 44 // creating a committed entry to correspond to a to-be-deleted pending entry, |
| 45 // the pending entry's ID must be copied). | 45 // the pending entry's ID must be copied). |
| 46 virtual int GetUniqueID() const = 0; | 46 virtual int GetUniqueID() const = 0; |
| 47 | 47 |
| 48 // The page type tells us if this entry is for an interstitial or error page. | 48 // The page type tells us if this entry is for an interstitial or error page. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; | 219 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; |
| 220 virtual const std::vector<GURL>& GetRedirectChain() const = 0; | 220 virtual const std::vector<GURL>& GetRedirectChain() const = 0; |
| 221 | 221 |
| 222 // True if this entry is restored and hasn't been loaded. | 222 // True if this entry is restored and hasn't been loaded. |
| 223 virtual bool IsRestored() const = 0; | 223 virtual bool IsRestored() const = 0; |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 } // namespace content | 226 } // namespace content |
| 227 | 227 |
| 228 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 228 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| OLD | NEW |