| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ | 5 #ifndef IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ |
| 6 #define IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ | 6 #define IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual void SetTitle(const base::string16& title) = 0; | 64 virtual void SetTitle(const base::string16& title) = 0; |
| 65 virtual const base::string16& GetTitle() const = 0; | 65 virtual const base::string16& GetTitle() const = 0; |
| 66 | 66 |
| 67 // Stores the NavigationItem's last recorded scroll offset and zoom scale. | 67 // Stores the NavigationItem's last recorded scroll offset and zoom scale. |
| 68 virtual void SetPageDisplayState(const PageDisplayState& page_state) = 0; | 68 virtual void SetPageDisplayState(const PageDisplayState& page_state) = 0; |
| 69 virtual const PageDisplayState& GetPageDisplayState() const = 0; | 69 virtual const PageDisplayState& GetPageDisplayState() const = 0; |
| 70 | 70 |
| 71 // Page-related helpers ------------------------------------------------------ | 71 // Page-related helpers ------------------------------------------------------ |
| 72 | 72 |
| 73 // Returns the title to be displayed on the tab. This could be the title of | 73 // Returns the title to be displayed on the tab. This could be the title of |
| 74 // the page if it is available or the URL. |languages| is the list of | 74 // the page if it is available or the URL. |
| 75 // accepted languages (e.g., prefs::kAcceptLanguages) or empty if proper | 75 virtual const base::string16& GetTitleForDisplay() const = 0; |
| 76 // URL formatting isn't needed (e.g., unit tests). | |
| 77 virtual const base::string16& GetTitleForDisplay( | |
| 78 const std::string& languages) const = 0; | |
| 79 | 76 |
| 80 // Tracking stuff ------------------------------------------------------------ | 77 // Tracking stuff ------------------------------------------------------------ |
| 81 | 78 |
| 82 // The transition type indicates what the user did to move to this page from | 79 // The transition type indicates what the user did to move to this page from |
| 83 // the previous page. | 80 // the previous page. |
| 84 virtual void SetTransitionType(ui::PageTransition transition_type) = 0; | 81 virtual void SetTransitionType(ui::PageTransition transition_type) = 0; |
| 85 virtual ui::PageTransition GetTransitionType() const = 0; | 82 virtual ui::PageTransition GetTransitionType() const = 0; |
| 86 | 83 |
| 87 // The favicon data and tracking information. See web::FaviconStatus. | 84 // The favicon data and tracking information. See web::FaviconStatus. |
| 88 virtual const FaviconStatus& GetFavicon() const = 0; | 85 virtual const FaviconStatus& GetFavicon() const = 0; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 virtual NSDictionary* GetHttpRequestHeaders() const = 0; | 119 virtual NSDictionary* GetHttpRequestHeaders() const = 0; |
| 123 | 120 |
| 124 // Adds headers from |additional_headers| to the item's http request headers. | 121 // Adds headers from |additional_headers| to the item's http request headers. |
| 125 // Existing headers with the same key will be overridden. | 122 // Existing headers with the same key will be overridden. |
| 126 virtual void AddHttpRequestHeaders(NSDictionary* additional_headers) = 0; | 123 virtual void AddHttpRequestHeaders(NSDictionary* additional_headers) = 0; |
| 127 }; | 124 }; |
| 128 | 125 |
| 129 } // namespace web | 126 } // namespace web |
| 130 | 127 |
| 131 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ | 128 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ |
| OLD | NEW |