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

Side by Side Diff: ios/web/navigation/web_load_params.h

Issue 1028603004: Upstream ios/web/navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-testing
Patch Set: Rebase and resync Created 5 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
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #ifndef IOS_WEB_NAVIGATION_WEB_LOAD_PARAMS_H_
6 #define IOS_WEB_NAVIGATION_WEB_LOAD_PARAMS_H_
7
8 #import <Foundation/Foundation.h>
9
10 #import "base/mac/scoped_nsobject.h"
11 #include "ios/net/request_tracker.h"
12 #include "ios/web/public/referrer.h"
13 #include "ui/base/page_transition_types.h"
14 #include "url/gurl.h"
15
16 namespace web {
17
18 // Parameters for creating a tab. Most paramaters are optional, and
19 // can be left at the default values set by the constructor.
20 // TODO(stuartmorgan): Remove the dependency on RequestTracker, then move
21 // this into NavigationManager to parallel NavigationController's
22 // LoadURLParams (which this is modeled after).
23 struct WebLoadParams {
24 public:
25 // The URL to load. Must be set.
26 GURL url;
27
28 // The referrer for the load. May be empty.
29 Referrer referrer;
30
31 // The transition type for the load. Defaults to PAGE_TRANSITION_LINK.
32 ui::PageTransition transition_type;
33
34 // True for renderer-initiated navigations. This is
35 // important for tracking whether to display pending URLs.
36 bool is_renderer_initiated;
37
38 // The cache mode to load with. Defaults to CACHE_NORMAL.
39 net::RequestTracker::CacheMode cache_mode;
40
41 // Any extra HTTP headers to add to the load.
42 base::scoped_nsobject<NSDictionary> extra_headers;
43
44 // Any post data to send with the load. When setting this, you should
45 // generally set a Content-Type header as well.
46 base::scoped_nsobject<NSData> post_data;
47
48 // Create a new WebLoadParams with the given URL and defaults for all other
49 // parameters.
50 explicit WebLoadParams(const GURL& url);
51 ~WebLoadParams();
52
53 // Allow copying WebLoadParams.
54 WebLoadParams(const WebLoadParams& other);
55 WebLoadParams& operator=(const WebLoadParams& other);
56 };
57
58 } // namespace web
59
60 #endif // IOS_WEB_NAVIGATION_WEB_LOAD_PARAMS_H_
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_manager_impl_unittest.mm ('k') | ios/web/navigation/web_load_params.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698