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

Side by Side Diff: ios/web/public/navigation_item.h

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: rebase + compile fix Created 3 years, 9 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 | « ios/web/public/crw_navigation_item_storage.mm ('k') | ios/web/public/user_agent.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PUBLIC_NAVIGATION_ITEM_H_ 5 #ifndef IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_
6 #define IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ 6 #define IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "base/supports_user_data.h" 11 #include "base/supports_user_data.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #import "ios/web/public/user_agent.h"
13 #import "ios/web/public/web_state/page_display_state.h" 14 #import "ios/web/public/web_state/page_display_state.h"
14 #include "ui/base/page_transition_types.h" 15 #include "ui/base/page_transition_types.h"
15 16
16 class GURL; 17 class GURL;
17 18
18 @class NSDictionary; 19 @class NSDictionary;
19 20
20 namespace web { 21 namespace web {
21 struct FaviconStatus; 22 struct FaviconStatus;
22 struct Referrer; 23 struct Referrer;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // 102 //
102 // If GetTimestamp() returns a null time, that means that either: 103 // If GetTimestamp() returns a null time, that means that either:
103 // 104 //
104 // - this navigation hasn't completed yet; 105 // - this navigation hasn't completed yet;
105 // - this navigation was restored and for some reason the 106 // - this navigation was restored and for some reason the
106 // timestamp wasn't available; 107 // timestamp wasn't available;
107 // - or this navigation was copied from a foreign session. 108 // - or this navigation was copied from a foreign session.
108 virtual void SetTimestamp(base::Time timestamp) = 0; 109 virtual void SetTimestamp(base::Time timestamp) = 0;
109 virtual base::Time GetTimestamp() const = 0; 110 virtual base::Time GetTimestamp() const = 0;
110 111
111 // |true| if this item uses a desktop user agent in HTTP requests and 112 // The type of user agent requested for the navigation.
112 // UIWebView. 113 // TODO(crbug.com/697512): Create equivalent enum type for WebContents.
113 virtual void SetIsOverridingUserAgent(bool is_overriding_user_agent) = 0; 114 virtual void SetUserAgentType(UserAgentType type) = 0;
114 virtual bool IsOverridingUserAgent() const = 0; 115 virtual UserAgentType GetUserAgentType() const = 0;
115 116
116 // |true| if this item is the result of a POST request with data. 117 // |true| if this item is the result of a POST request with data.
117 virtual bool HasPostData() const = 0; 118 virtual bool HasPostData() const = 0;
118 119
119 // Returns the item's current http request headers. 120 // Returns the item's current http request headers.
120 virtual NSDictionary* GetHttpRequestHeaders() const = 0; 121 virtual NSDictionary* GetHttpRequestHeaders() const = 0;
121 122
122 // Adds headers from |additional_headers| to the item's http request headers. 123 // Adds headers from |additional_headers| to the item's http request headers.
123 // Existing headers with the same key will be overridden. 124 // Existing headers with the same key will be overridden.
124 virtual void AddHttpRequestHeaders(NSDictionary* additional_headers) = 0; 125 virtual void AddHttpRequestHeaders(NSDictionary* additional_headers) = 0;
125 }; 126 };
126 127
127 } // namespace web 128 } // namespace web
128 129
129 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ 130 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_
OLDNEW
« no previous file with comments | « ios/web/public/crw_navigation_item_storage.mm ('k') | ios/web/public/user_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698