Update V8 to version 4.6.61.
[chromium-blink-merge.git] / ios / web / navigation / web_load_params.h
blob0fea4df104068041206bc02f4a5bc82346395179
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.
5 #ifndef IOS_WEB_NAVIGATION_WEB_LOAD_PARAMS_H_
6 #define IOS_WEB_NAVIGATION_WEB_LOAD_PARAMS_H_
8 #import <Foundation/Foundation.h>
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"
16 namespace web {
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;
28 // The referrer for the load. May be empty.
29 Referrer referrer;
31 // The transition type for the load. Defaults to PAGE_TRANSITION_LINK.
32 ui::PageTransition transition_type;
34 // True for renderer-initiated navigations. This is
35 // important for tracking whether to display pending URLs.
36 bool is_renderer_initiated;
38 // The cache mode to load with. Defaults to CACHE_NORMAL.
39 net::RequestTracker::CacheMode cache_mode;
41 // Any extra HTTP headers to add to the load.
42 base::scoped_nsobject<NSDictionary> extra_headers;
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;
48 // Create a new WebLoadParams with the given URL and defaults for all other
49 // parameters.
50 explicit WebLoadParams(const GURL& url);
51 ~WebLoadParams();
53 // Allow copying WebLoadParams.
54 WebLoadParams(const WebLoadParams& other);
55 WebLoadParams& operator=(const WebLoadParams& other);
58 } // namespace web
60 #endif // IOS_WEB_NAVIGATION_WEB_LOAD_PARAMS_H_