| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual void SetVirtualURL(const GURL& url) = 0; | 69 virtual void SetVirtualURL(const GURL& url) = 0; |
| 70 virtual const GURL& GetVirtualURL() const = 0; | 70 virtual const GURL& GetVirtualURL() const = 0; |
| 71 | 71 |
| 72 // The title as set by the page. This will be empty if there is no title set. | 72 // The title as set by the page. This will be empty if there is no title set. |
| 73 // The caller is responsible for detecting when there is no title and | 73 // The caller is responsible for detecting when there is no title and |
| 74 // displaying the appropriate "Untitled" label if this is being displayed to | 74 // displaying the appropriate "Untitled" label if this is being displayed to |
| 75 // the user. | 75 // the user. |
| 76 virtual void SetTitle(const string16& title) = 0; | 76 virtual void SetTitle(const string16& title) = 0; |
| 77 virtual const string16& GetTitle() const = 0; | 77 virtual const string16& GetTitle() const = 0; |
| 78 | 78 |
| 79 // XXX | 79 // Page state is an opaque blob created by Blink that represents the state of |
| 80 // Content state is an opaque blob created by WebKit that represents the | 80 // the page. This includes form entries and scroll position for each frame. |
| 81 // state of the page. This includes form entries and scroll position for each | 81 // We store it so that we can supply it back to Blink to restore form state |
| 82 // frame. We store it so that we can supply it back to WebKit to restore form | 82 // properly when the user goes back and forward. |
| 83 // state properly when the user goes back and forward. | |
| 84 // | 83 // |
| 85 // WARNING: This state is saved to the file and used to restore previous | 84 // NOTE: This state is saved to disk and used to restore previous states. If |
| 86 // states. If the format is modified in the future, we should still be able to | 85 // the format is modified in the future, we should still be able to deal with |
| 87 // deal with older versions. | 86 // older versions. |
| 88 virtual void SetPageState(const PageState& state) = 0; | 87 virtual void SetPageState(const PageState& state) = 0; |
| 89 virtual const PageState& GetPageState() const = 0; | 88 virtual const PageState& GetPageState() const = 0; |
| 90 | 89 |
| 91 // Describes the current page that the tab represents. This is the ID that the | 90 // Describes the current page that the tab represents. This is the ID that the |
| 92 // renderer generated for the page and is how we can tell new versus | 91 // renderer generated for the page and is how we can tell new versus |
| 93 // renavigations. | 92 // renavigations. |
| 94 virtual void SetPageID(int page_id) = 0; | 93 virtual void SetPageID(int page_id) = 0; |
| 95 virtual int32 GetPageID() const = 0; | 94 virtual int32 GetPageID() const = 0; |
| 96 | 95 |
| 97 // Page-related helpers ------------------------------------------------------ | 96 // Page-related helpers ------------------------------------------------------ |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // - a response wasn't received; | 205 // - a response wasn't received; |
| 207 // - or this navigation was restored and for some reason the | 206 // - or this navigation was restored and for some reason the |
| 208 // status code wasn't available. | 207 // status code wasn't available. |
| 209 virtual void SetHttpStatusCode(int http_status_code) = 0; | 208 virtual void SetHttpStatusCode(int http_status_code) = 0; |
| 210 virtual int GetHttpStatusCode() const = 0; | 209 virtual int GetHttpStatusCode() const = 0; |
| 211 }; | 210 }; |
| 212 | 211 |
| 213 } // namespace content | 212 } // namespace content |
| 214 | 213 |
| 215 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 214 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| OLD | NEW |