OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/ref_counted_memory.h" |
10 #include "chrome/browser/ui/host_desktop.h" | 12 #include "chrome/browser/ui/host_desktop.h" |
11 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
12 #include "content/public/browser/global_request_id.h" | 14 #include "content/public/browser/global_request_id.h" |
13 #include "content/public/browser/page_navigator.h" | 15 #include "content/public/browser/page_navigator.h" |
14 #include "content/public/common/page_transition_types.h" | 16 #include "content/public/common/page_transition_types.h" |
15 #include "content/public/common/referrer.h" | 17 #include "content/public/common/referrer.h" |
16 #include "ui/base/window_open_disposition.h" | 18 #include "ui/base/window_open_disposition.h" |
17 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
18 #include "url/gurl.h" | 20 #include "url/gurl.h" |
19 | 21 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 content::WebContents* a_target_contents); | 58 content::WebContents* a_target_contents); |
57 NavigateParams(Profile* profile, | 59 NavigateParams(Profile* profile, |
58 const GURL& a_url, | 60 const GURL& a_url, |
59 content::PageTransition a_transition); | 61 content::PageTransition a_transition); |
60 ~NavigateParams(); | 62 ~NavigateParams(); |
61 | 63 |
62 // The URL/referrer to be loaded. Ignored if |target_contents| is non-NULL. | 64 // The URL/referrer to be loaded. Ignored if |target_contents| is non-NULL. |
63 GURL url; | 65 GURL url; |
64 content::Referrer referrer; | 66 content::Referrer referrer; |
65 | 67 |
| 68 // Indicates whether this navigation will be sent using POST. |
| 69 // The POST method is limited support for basic POST data by leveraging |
| 70 // NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST. |
| 71 // It is not for things like file uploads. |
| 72 bool uses_post; |
| 73 |
| 74 // The post data when the navigation uses POST. |
| 75 scoped_refptr<base::RefCountedMemory> browser_initiated_post_data; |
| 76 |
66 // Extra headers to add to the request for this page. Headers are | 77 // Extra headers to add to the request for this page. Headers are |
67 // represented as "<name>: <value>" and separated by \r\n. The entire string | 78 // represented as "<name>: <value>" and separated by \r\n. The entire string |
68 // is terminated by \r\n. May be empty if no extra headers are needed. | 79 // is terminated by \r\n. May be empty if no extra headers are needed. |
69 std::string extra_headers; | 80 std::string extra_headers; |
70 | 81 |
71 // [in] A WebContents to be navigated or inserted into the target | 82 // [in] A WebContents to be navigated or inserted into the target |
72 // Browser's tabstrip. If NULL, |url| or the homepage will be used | 83 // Browser's tabstrip. If NULL, |url| or the homepage will be used |
73 // instead. When non-NULL, Navigate() assumes it has already been | 84 // instead. When non-NULL, Navigate() assumes it has already been |
74 // navigated to its intended destination and will not load any URL in it | 85 // navigated to its intended destination and will not load any URL in it |
75 // (i.e. |url| is ignored). | 86 // (i.e. |url| is ignored). |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // Navigates according to the configuration specified in |params|. | 238 // Navigates according to the configuration specified in |params|. |
228 void Navigate(NavigateParams* params); | 239 void Navigate(NavigateParams* params); |
229 | 240 |
230 // Returns true if the url is allowed to open in incognito window. | 241 // Returns true if the url is allowed to open in incognito window. |
231 bool IsURLAllowedInIncognito(const GURL& url, | 242 bool IsURLAllowedInIncognito(const GURL& url, |
232 content::BrowserContext* browser_context); | 243 content::BrowserContext* browser_context); |
233 | 244 |
234 } // namespace chrome | 245 } // namespace chrome |
235 | 246 |
236 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 247 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
OLD | NEW |