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

Side by Side Diff: ios/web/public/navigation_item.h

Issue 678483003: Adds web::NavigationItemImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
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/strings/string16.h" 9 #include "base/strings/string16.h"
9 #include "base/time/time.h" 10 #include "base/time/time.h"
10 #include "ui/base/page_transition_types.h" 11 #include "ui/base/page_transition_types.h"
11 12
12 class GURL; 13 class GURL;
13 14
14 namespace web { 15 namespace web {
15 struct FaviconStatus; 16 struct FaviconStatus;
16 struct Referrer; 17 struct Referrer;
17 struct SSLStatus; 18 struct SSLStatus;
18 19
19 // A NavigationItem is a data structure that captures all the information 20 // A NavigationItem is a data structure that captures all the information
20 // required to recreate a browsing state. It represents one point in the 21 // required to recreate a browsing state. It represents one point in the
21 // chain of navigation managed by a NavigationManager. 22 // chain of navigation managed by a NavigationManager.
22 class NavigationItem { 23 class NavigationItem {
23 public: 24 public:
24 virtual ~NavigationItem() {} 25 virtual ~NavigationItem() {}
25 26
27 // Creates a new NavigationItem.
28 static scoped_ptr<NavigationItem> Create();
29
26 // Page-related stuff -------------------------------------------------------- 30 // Page-related stuff --------------------------------------------------------
27 31
28 // A unique ID is preserved across commits and redirects, which means that 32 // A unique ID is preserved across commits and redirects, which means that
29 // sometimes a NavigationEntry's unique ID needs to be set (e.g. when 33 // sometimes a NavigationEntry's unique ID needs to be set (e.g. when
30 // creating a committed entry to correspond to a to-be-deleted pending entry, 34 // creating a committed entry to correspond to a to-be-deleted pending entry,
31 // the pending entry's ID must be copied). 35 // the pending entry's ID must be copied).
32 virtual int GetUniqueID() const = 0; 36 virtual int GetUniqueID() const = 0;
33 37
34 // The actual URL of the page. For some about pages, this may be a scary 38 // The actual URL of the page. For some about pages, this may be a scary
35 // data: URL or something like that. Use GetVirtualURL() below for showing to 39 // data: URL or something like that. Use GetVirtualURL() below for showing to
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // - this navigation was restored and for some reason the 102 // - this navigation was restored and for some reason the
99 // timestamp wasn't available; 103 // timestamp wasn't available;
100 // - or this navigation was copied from a foreign session. 104 // - or this navigation was copied from a foreign session.
101 virtual void SetTimestamp(base::Time timestamp) = 0; 105 virtual void SetTimestamp(base::Time timestamp) = 0;
102 virtual base::Time GetTimestamp() const = 0; 106 virtual base::Time GetTimestamp() const = 0;
103 }; 107 };
104 108
105 } // namespace web 109 } // namespace web
106 110
107 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ 111 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698