OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_ | |
6 #define COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_ | |
7 | |
8 #include "components/web_view/url_request_cloneable.h" | |
9 | |
10 #include "base/macros.h" | |
11 #include "url/gurl.h" | |
12 | |
13 namespace web_view { | |
14 | |
15 // Contains all information needed about an individual navigation in the | |
16 // navigation stack. | |
17 class NavigationEntry { | |
18 public: | |
19 explicit NavigationEntry(mojo::URLRequestPtr original_request); | |
20 explicit NavigationEntry(const GURL& raw_url); | |
21 ~NavigationEntry(); | |
22 | |
23 // Builds a copy of the URLRequest that generated this navigation. This | |
24 // method is heavyweight as it clones a few mojo pipes. | |
25 mojo::URLRequestPtr BuildURLRequest(bool update_originating_time); | |
26 | |
27 private: | |
28 // TODO(erg): This is not enough information to regenerate the state of the | |
29 // world. This is only enough information to regenerate some top level frame | |
30 // navigations. A full implementation would require individual | |
31 // FrameNavigationEntry objects like in content::NavigationEntryImpl. | |
32 URLRequestCloneable url_request_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(NavigationEntry); | |
35 }; | |
36 | |
37 } // namespace web_view | |
38 | |
39 #endif // COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_ | |
OLD | NEW |