Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / web_view / navigation_entry.h
blobb6bcde7fe3140dd2d668c6909979684c99837990
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.
5 #ifndef COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_
6 #define COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_
8 #include "components/web_view/url_request_cloneable.h"
10 namespace web_view {
12 // Contains all information needed about an individual navigation in the
13 // navigation stack.
14 class NavigationEntry {
15 public:
16 explicit NavigationEntry(mojo::URLRequestPtr original_request);
17 ~NavigationEntry();
19 // Builds a copy of the URLRequest that generated this navigation. This
20 // method is heavyweight as it clones a few mojo pipes.
21 mojo::URLRequestPtr BuildURLRequest() const;
23 private:
24 // TODO(erg): This is not enough information to regenerate the state of the
25 // world. This is only enough information to regenerate some top level frame
26 // navigations. A full implementation would require individual
27 // FrameNavigationEntry objects like in content::NavigationEntryImpl.
28 URLRequestCloneable url_request_;
30 DISALLOW_COPY_AND_ASSIGN(NavigationEntry);
33 } // namespace web_view
35 #endif // COMPONENTS_WEB_VIEW_NAVIGATION_ENTRY_H_