| 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 <string> | 10 #include <string> |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // Describes the current page that the tab represents. This is the ID that the | 103 // Describes the current page that the tab represents. This is the ID that the |
| 104 // renderer generated for the page and is how we can tell new versus | 104 // renderer generated for the page and is how we can tell new versus |
| 105 // renavigations. | 105 // renavigations. |
| 106 virtual void SetPageID(int page_id) = 0; | 106 virtual void SetPageID(int page_id) = 0; |
| 107 virtual int32_t GetPageID() const = 0; | 107 virtual int32_t GetPageID() const = 0; |
| 108 | 108 |
| 109 // Page-related helpers ------------------------------------------------------ | 109 // Page-related helpers ------------------------------------------------------ |
| 110 | 110 |
| 111 // Returns the title to be displayed on the tab. This could be the title of | 111 // Returns the title to be displayed on the tab. This could be the title of |
| 112 // the page if it is available or the URL. |languages| is the list of | 112 // the page if it is available or the URL. |
| 113 // accepted languages (e.g., prefs::kAcceptLanguages) or empty if proper | 113 virtual const base::string16& GetTitleForDisplay() const = 0; |
| 114 // URL formatting isn't needed (e.g., unit tests). | |
| 115 virtual const base::string16& GetTitleForDisplay( | |
| 116 const std::string& languages) const = 0; | |
| 117 | 114 |
| 118 // Returns true if the current tab is in view source mode. This will be false | 115 // Returns true if the current tab is in view source mode. This will be false |
| 119 // if there is no navigation. | 116 // if there is no navigation. |
| 120 virtual bool IsViewSourceMode() const = 0; | 117 virtual bool IsViewSourceMode() const = 0; |
| 121 | 118 |
| 122 // Tracking stuff ------------------------------------------------------------ | 119 // Tracking stuff ------------------------------------------------------------ |
| 123 | 120 |
| 124 // The transition type indicates what the user did to move to this page from | 121 // The transition type indicates what the user did to move to this page from |
| 125 // the previous page. | 122 // the previous page. |
| 126 virtual void SetTransitionType(ui::PageTransition transition_type) = 0; | 123 virtual void SetTransitionType(ui::PageTransition transition_type) = 0; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; | 219 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; |
| 223 virtual const std::vector<GURL>& GetRedirectChain() const = 0; | 220 virtual const std::vector<GURL>& GetRedirectChain() const = 0; |
| 224 | 221 |
| 225 // True if this entry is restored and hasn't been loaded. | 222 // True if this entry is restored and hasn't been loaded. |
| 226 virtual bool IsRestored() const = 0; | 223 virtual bool IsRestored() const = 0; |
| 227 }; | 224 }; |
| 228 | 225 |
| 229 } // namespace content | 226 } // namespace content |
| 230 | 227 |
| 231 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 228 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| OLD | NEW |