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

Side by Side Diff: content/public/browser/navigation_entry.h

Issue 2327083002: Ntp: restore scroll position. (Closed)
Patch Set: fix build (const) Created 4 years, 3 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content_public/browser/NavigationEntry.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <map>
10 #include <memory> 11 #include <memory>
11 #include <string> 12 #include <string>
12 13
13 #include "base/memory/ref_counted_memory.h" 14 #include "base/memory/ref_counted_memory.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "base/time/time.h" 16 #include "base/time/time.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 #include "content/public/common/page_type.h" 19 #include "content/public/common/page_type.h"
19 #include "content/public/common/referrer.h" 20 #include "content/public/common/referrer.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 virtual void SetCanLoadLocalResources(bool allow) = 0; 199 virtual void SetCanLoadLocalResources(bool allow) = 0;
199 virtual bool GetCanLoadLocalResources() const = 0; 200 virtual bool GetCanLoadLocalResources() const = 0;
200 201
201 // Set extra data on this NavigationEntry according to the specified |key|. 202 // Set extra data on this NavigationEntry according to the specified |key|.
202 // This data is not persisted by default. 203 // This data is not persisted by default.
203 virtual void SetExtraData(const std::string& key, 204 virtual void SetExtraData(const std::string& key,
204 const base::string16& data) = 0; 205 const base::string16& data) = 0;
205 // If present, fills the |data| present at the specified |key|. 206 // If present, fills the |data| present at the specified |key|.
206 virtual bool GetExtraData(const std::string& key, 207 virtual bool GetExtraData(const std::string& key,
207 base::string16* data) const = 0; 208 base::string16* data) const = 0;
209 // Returns the extra data for this entry.
210 virtual const std::map<std::string, base::string16>& GetExtraData() const = 0;
clamy 2016/09/19 09:49:23 I cannot see any usage outside of content/ of this
Michael van Ouwerkerk 2016/09/19 14:27:40 Hi, are you suggesting that I should move this met
clamy 2016/09/19 15:25:27 Yes precisely. This is the design used all over co
Michael van Ouwerkerk 2016/09/19 15:57:39 Done.
208 // Removes the data at the specified |key|. 211 // Removes the data at the specified |key|.
209 virtual void ClearExtraData(const std::string& key) = 0; 212 virtual void ClearExtraData(const std::string& key) = 0;
210 213
211 // The status code of the last known successful navigation. If 214 // The status code of the last known successful navigation. If
212 // GetHttpStatusCode() returns 0 that means that either: 215 // GetHttpStatusCode() returns 0 that means that either:
213 // 216 //
214 // - this navigation hasn't completed yet; 217 // - this navigation hasn't completed yet;
215 // - a response wasn't received; 218 // - a response wasn't received;
216 // - or this navigation was restored and for some reason the 219 // - or this navigation was restored and for some reason the
217 // status code wasn't available. 220 // status code wasn't available.
218 virtual void SetHttpStatusCode(int http_status_code) = 0; 221 virtual void SetHttpStatusCode(int http_status_code) = 0;
219 virtual int GetHttpStatusCode() const = 0; 222 virtual int GetHttpStatusCode() const = 0;
220 223
221 // The redirect chain traversed during this navigation, from the initial 224 // The redirect chain traversed during this navigation, from the initial
222 // redirecting URL to the final non-redirecting current URL. 225 // redirecting URL to the final non-redirecting current URL.
223 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; 226 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0;
224 virtual const std::vector<GURL>& GetRedirectChain() const = 0; 227 virtual const std::vector<GURL>& GetRedirectChain() const = 0;
225 228
226 // True if this entry is restored and hasn't been loaded. 229 // True if this entry is restored and hasn't been loaded.
227 virtual bool IsRestored() const = 0; 230 virtual bool IsRestored() const = 0;
228 }; 231 };
229 232
230 } // namespace content 233 } // namespace content
231 234
232 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ 235 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content_public/browser/NavigationEntry.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698