OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PARAMS_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/ref_counted_memory.h" | 12 #include "base/memory/ref_counted_memory.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "chrome/browser/ui/host_desktop.h" | |
15 #include "content/public/browser/global_request_id.h" | 14 #include "content/public/browser/global_request_id.h" |
16 #include "content/public/browser/site_instance.h" | 15 #include "content/public/browser/site_instance.h" |
17 #include "content/public/common/referrer.h" | 16 #include "content/public/common/referrer.h" |
18 #include "ui/base/page_transition_types.h" | 17 #include "ui/base/page_transition_types.h" |
19 #include "ui/base/window_open_disposition.h" | 18 #include "ui/base/window_open_disposition.h" |
20 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
21 #include "url/gurl.h" | 20 #include "url/gurl.h" |
22 | 21 |
23 class Browser; | 22 class Browser; |
24 class Profile; | 23 class Profile; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // Navigate(), the caller is responsible for showing it so that its | 219 // Navigate(), the caller is responsible for showing it so that its |
221 // window can assume responsibility for the Browser's lifetime (Browser | 220 // window can assume responsibility for the Browser's lifetime (Browser |
222 // objects are deleted when the user closes a visible browser window). | 221 // objects are deleted when the user closes a visible browser window). |
223 Browser* browser; | 222 Browser* browser; |
224 #endif | 223 #endif |
225 | 224 |
226 // The profile that is initiating the navigation. If there is a non-NULL | 225 // The profile that is initiating the navigation. If there is a non-NULL |
227 // browser passed in via |browser|, it's profile will be used instead. | 226 // browser passed in via |browser|, it's profile will be used instead. |
228 Profile* initiating_profile; | 227 Profile* initiating_profile; |
229 | 228 |
230 // Refers to which desktop this navigation should occur on. May be passed | |
231 // explicitly or inferred from an existing Browser instance. | |
232 chrome::HostDesktopType host_desktop_type; | |
233 | |
234 // Indicates whether this navigation should replace the current | 229 // Indicates whether this navigation should replace the current |
235 // navigation entry. | 230 // navigation entry. |
236 bool should_replace_current_entry; | 231 bool should_replace_current_entry; |
237 | 232 |
238 // Indicates whether |target_contents| is being created with a window.opener. | 233 // Indicates whether |target_contents| is being created with a window.opener. |
239 bool created_with_opener; | 234 bool created_with_opener; |
240 | 235 |
241 // SiteInstance of the frame that initiated the navigation or null if we | 236 // SiteInstance of the frame that initiated the navigation or null if we |
242 // don't know it. This should be assigned from the OpenURLParams of the | 237 // don't know it. This should be assigned from the OpenURLParams of the |
243 // WebContentsDelegate::OpenURLFromTab implementation and is used to determine | 238 // WebContentsDelegate::OpenURLFromTab implementation and is used to determine |
244 // the SiteInstance that will be used for the resulting frame in the case of | 239 // the SiteInstance that will be used for the resulting frame in the case of |
245 // an about:blank or a data url navigation. | 240 // an about:blank or a data url navigation. |
246 scoped_refptr<content::SiteInstance> source_site_instance; | 241 scoped_refptr<content::SiteInstance> source_site_instance; |
247 | 242 |
248 private: | 243 private: |
249 NavigateParams(); | 244 NavigateParams(); |
250 }; | 245 }; |
251 | 246 |
252 // Copies fields from |params| struct to |nav_params| struct. | 247 // Copies fields from |params| struct to |nav_params| struct. |
253 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, | 248 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, |
254 const content::OpenURLParams& params); | 249 const content::OpenURLParams& params); |
255 | 250 |
256 } // namespace chrome | 251 } // namespace chrome |
257 | 252 |
258 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 253 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ |
OLD | NEW |