OLD | NEW |
---|---|
(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 "ui/base/page_transition_types.h" | |
9 | |
10 class GURL; | |
11 | |
12 namespace web { | |
13 | |
14 // A NavigationItem is a data structure that captures all the information | |
15 // required to recreate a browsing state. It represents one point in the | |
16 // chain of navigation managed by a NavigationManager. | |
17 class NavigationItem { | |
18 public: | |
19 virtual ~NavigationItem() {} | |
20 | |
21 // The actual URL of the page. For some about pages, this may be a scary | |
22 // data: URL or something like that. Use GetVirtualURL() below for showing to | |
23 // the user. | |
24 virtual const GURL& GetURL() const = 0; | |
25 | |
26 // The URL that should be shown to the user. In most cases this is the same | |
27 // as the URL above, but in some case the underlying URL might not be | |
28 // suitable for display to the user. | |
29 virtual const GURL& GetVirtualURL() const = 0; | |
30 | |
31 // The title as set by the page. This will be empty if there is no title set. | |
32 // The caller is responsible for detecting when there is no title and | |
33 // displaying the appropriate "Untitled" label if this is being displayed to | |
34 // the user. | |
35 virtual const base::string16& GetTitle() const = 0; | |
stuartmorgan
2014/10/09 20:39:35
Looks like we're missing a string16.h include, and
rohitrao (ping after 24h)
2014/10/09 20:52:53
Done.
| |
36 | |
37 // The transition type indicates what the user did to move to this page from | |
38 // the previous page. | |
39 virtual ui::PageTransition GetTransitionType() const = 0; | |
40 }; | |
41 | |
42 } // namespace web | |
43 | |
44 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ | |
OLD | NEW |