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