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