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

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

Issue 647543002: Adds web::NavigationItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include. Created 6 years, 2 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 | « ios/web/ios_web.gyp ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_
6 #define IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_
7
8 #include "base/strings/string16.h"
9 #include "ui/base/page_transition_types.h"
10
11 class GURL;
12
13 namespace web {
14
15 // A NavigationItem is a data structure that captures all the information
16 // required to recreate a browsing state. It represents one point in the
17 // chain of navigation managed by a NavigationManager.
18 class NavigationItem {
19 public:
20 virtual ~NavigationItem() {}
21
22 // The actual URL of the page. For some about pages, this may be a scary
23 // data: URL or something like that. Use GetVirtualURL() below for showing to
24 // the user.
25 virtual const GURL& GetURL() const = 0;
26
27 // The URL that should be shown to the user. In most cases this is the same
28 // as the URL above, but in some case the underlying URL might not be
29 // suitable for display to the user.
30 virtual const GURL& GetVirtualURL() const = 0;
31
32 // The title as set by the page. This will be empty if there is no title set.
33 // The caller is responsible for detecting when there is no title and
34 // displaying the appropriate "Untitled" label if this is being displayed to
35 // the user.
36 virtual const base::string16& GetTitle() const = 0;
37
38 // The transition type indicates what the user did to move to this page from
39 // the previous page.
40 virtual ui::PageTransition GetTransitionType() const = 0;
41 };
42
43 } // namespace web
44
45 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_
OLDNEW
« no previous file with comments | « ios/web/ios_web.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698