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 "chrome/browser/ui/host_desktop.h" | 10 #include "chrome/browser/ui/host_desktop.h" |
11 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
12 #include "content/public/browser/global_request_id.h" | 12 #include "content/public/browser/global_request_id.h" |
13 #include "content/public/common/page_transition_types.h" | 13 #include "content/public/common/page_transition_types.h" |
14 #include "content/public/common/referrer.h" | 14 #include "content/public/common/referrer.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
17 #include "webkit/glue/window_open_disposition.h" | 17 #include "webkit/glue/window_open_disposition.h" |
18 | 18 |
19 class Browser; | 19 class Browser; |
20 class Profile; | 20 class Profile; |
21 class TabContents; | 21 class TabContents; |
22 | 22 |
| 23 namespace webkit_glue { |
| 24 class ResourceRequestBody; |
| 25 } |
| 26 |
23 namespace chrome { | 27 namespace chrome { |
24 | 28 |
25 // Parameters that tell Navigate() what to do. | 29 // Parameters that tell Navigate() what to do. |
26 // | 30 // |
27 // Some basic examples: | 31 // Some basic examples: |
28 // | 32 // |
29 // Simple Navigate to URL in current tab: | 33 // Simple Navigate to URL in current tab: |
30 // chrome::NavigateParams params(browser, GURL("http://www.google.com/"), | 34 // chrome::NavigateParams params(browser, GURL("http://www.google.com/"), |
31 // content::PAGE_TRANSITION_LINK); | 35 // content::PAGE_TRANSITION_LINK); |
32 // chrome::Navigate(¶ms); | 36 // chrome::Navigate(¶ms); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 content::GlobalRequestID transferred_global_request_id; | 204 content::GlobalRequestID transferred_global_request_id; |
201 | 205 |
202 // Refers to which desktop this navigation should occur on. May be passed | 206 // Refers to which desktop this navigation should occur on. May be passed |
203 // explicitly or inferred from an existing Browser instance. | 207 // explicitly or inferred from an existing Browser instance. |
204 chrome::HostDesktopType host_desktop_type; | 208 chrome::HostDesktopType host_desktop_type; |
205 | 209 |
206 // Indicates whether this navigation involves a cross-process redirect, | 210 // Indicates whether this navigation involves a cross-process redirect, |
207 // in which case it should replace the current navigation entry. | 211 // in which case it should replace the current navigation entry. |
208 bool is_cross_site_redirect; | 212 bool is_cross_site_redirect; |
209 | 213 |
| 214 // Refers to the post data of the load for cross-process POST submission. |
| 215 scoped_refptr<webkit_glue::ResourceRequestBody> post_data; |
| 216 |
210 private: | 217 private: |
211 NavigateParams(); | 218 NavigateParams(); |
212 }; | 219 }; |
213 | 220 |
214 // Navigates according to the configuration specified in |params|. | 221 // Navigates according to the configuration specified in |params|. |
215 void Navigate(NavigateParams* params); | 222 void Navigate(NavigateParams* params); |
216 | 223 |
217 // Returns true if the url is allowed to open in incognito window. | 224 // Returns true if the url is allowed to open in incognito window. |
218 bool IsURLAllowedInIncognito(const GURL& url, | 225 bool IsURLAllowedInIncognito(const GURL& url, |
219 content::BrowserContext* browser_context); | 226 content::BrowserContext* browser_context); |
220 | 227 |
221 } // namespace chrome | 228 } // namespace chrome |
222 | 229 |
223 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 230 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
OLD | NEW |