Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: ios/web/web_state/navigation_context_impl.h

Issue 2881933003: Store NavigationItem's unique ID in navigation context. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ios/web/web_state/navigation_context_impl.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 IOS_WEB_WEB_STATE_NAVIGATION_CONTEXT_IMPL_H_ 5 #ifndef IOS_WEB_WEB_STATE_NAVIGATION_CONTEXT_IMPL_H_
6 #define IOS_WEB_WEB_STATE_NAVIGATION_CONTEXT_IMPL_H_ 6 #define IOS_WEB_WEB_STATE_NAVIGATION_CONTEXT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 24 matching lines...) Expand all
35 bool IsErrorPage() const override; 35 bool IsErrorPage() const override;
36 net::HttpResponseHeaders* GetResponseHeaders() const override; 36 net::HttpResponseHeaders* GetResponseHeaders() const override;
37 ~NavigationContextImpl() override; 37 ~NavigationContextImpl() override;
38 38
39 // Setters for navigation context data members. 39 // Setters for navigation context data members.
40 void SetIsSameDocument(bool is_same_document); 40 void SetIsSameDocument(bool is_same_document);
41 void SetIsErrorPage(bool is_error_page); 41 void SetIsErrorPage(bool is_error_page);
42 void SetResponseHeaders( 42 void SetResponseHeaders(
43 const scoped_refptr<net::HttpResponseHeaders>& response_headers); 43 const scoped_refptr<net::HttpResponseHeaders>& response_headers);
44 44
45 // Optional unique id of the navigation item associated with this navigaiton.
46 int GetNavigationItemUniqueID() const;
47 void SetNavigationItemUniqueID(int unique_id);
48
45 private: 49 private:
46 NavigationContextImpl( 50 NavigationContextImpl(
47 WebState* web_state, 51 WebState* web_state,
48 const GURL& url, 52 const GURL& url,
49 bool is_same_page, 53 bool is_same_page,
50 bool is_error_page, 54 bool is_error_page,
51 const scoped_refptr<net::HttpResponseHeaders>& response_headers); 55 const scoped_refptr<net::HttpResponseHeaders>& response_headers);
52 56
53 WebState* web_state_ = nullptr; 57 WebState* web_state_ = nullptr;
54 GURL url_; 58 GURL url_;
55 bool is_same_document_ = false; 59 bool is_same_document_ = false;
56 bool is_error_page_ = false; 60 bool is_error_page_ = false;
57 scoped_refptr<net::HttpResponseHeaders> response_headers_; 61 scoped_refptr<net::HttpResponseHeaders> response_headers_;
62 int navigation_item_unique_id_ = -1;
58 63
59 DISALLOW_COPY_AND_ASSIGN(NavigationContextImpl); 64 DISALLOW_COPY_AND_ASSIGN(NavigationContextImpl);
60 }; 65 };
61 66
62 } // namespace web 67 } // namespace web
63 68
64 #endif // IOS_WEB_WEB_STATE_NAVIGATION_CONTEXT_IMPL_H_ 69 #endif // IOS_WEB_WEB_STATE_NAVIGATION_CONTEXT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | ios/web/web_state/navigation_context_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698