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 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 // chrome::NavigateParams params(browser, popup_contents); | 48 // chrome::NavigateParams params(browser, popup_contents); |
49 // params.source_contents = source_contents; | 49 // params.source_contents = source_contents; |
50 // chrome::Navigate(¶ms); | 50 // chrome::Navigate(¶ms); |
51 // | 51 // |
52 // See browser_navigator_browsertest.cc for more examples. | 52 // See browser_navigator_browsertest.cc for more examples. |
53 | 53 |
54 // TODO(thestig): Split or ifdef out more fields that are not used on Android. | 54 // TODO(thestig): Split or ifdef out more fields that are not used on Android. |
55 struct NavigateParams { | 55 struct NavigateParams { |
56 #if defined(OS_ANDROID) | 56 #if defined(OS_ANDROID) |
57 explicit NavigateParams(content::WebContents* a_target_contents); | 57 explicit NavigateParams(content::WebContents* a_target_contents); |
58 #else | 58 #endif |
59 #if !defined(OS_ANDROID) || defined(USE_AURA) | |
mfomitchev
2015/11/10 21:27:28
I don't see any changes to browser_navigator_param
Hadi
2015/11/12 16:33:36
I spent some time on this and couldn't figure out
| |
59 NavigateParams(Browser* browser, | 60 NavigateParams(Browser* browser, |
60 const GURL& a_url, | 61 const GURL& a_url, |
61 ui::PageTransition a_transition); | 62 ui::PageTransition a_transition); |
62 NavigateParams(Browser* browser, | 63 NavigateParams(Browser* browser, |
63 content::WebContents* a_target_contents); | 64 content::WebContents* a_target_contents); |
64 #endif | 65 #endif |
65 NavigateParams(Profile* profile, | 66 NavigateParams(Profile* profile, |
66 const GURL& a_url, | 67 const GURL& a_url, |
67 ui::PageTransition a_transition); | 68 ui::PageTransition a_transition); |
68 ~NavigateParams(); | 69 ~NavigateParams(); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 // What to do with the ref component of the URL for singleton navigations. | 199 // What to do with the ref component of the URL for singleton navigations. |
199 enum RefBehavior { | 200 enum RefBehavior { |
200 // Two URLs with differing refs are same. | 201 // Two URLs with differing refs are same. |
201 IGNORE_REF, | 202 IGNORE_REF, |
202 // Two URLs with differing refs are different. | 203 // Two URLs with differing refs are different. |
203 RESPECT_REF, | 204 RESPECT_REF, |
204 }; | 205 }; |
205 // Default is IGNORE. | 206 // Default is IGNORE. |
206 RefBehavior ref_behavior; | 207 RefBehavior ref_behavior; |
207 | 208 |
208 #if !defined(OS_ANDROID) | 209 #if !defined(OS_ANDROID) || defined(USE_AURA) |
209 // [in] Specifies a Browser object where the navigation could occur or the | 210 // [in] Specifies a Browser object where the navigation could occur or the |
210 // tab could be added. Navigate() is not obliged to use this Browser if | 211 // tab could be added. Navigate() is not obliged to use this Browser if |
211 // it is not compatible with the operation being performed. This can be | 212 // it is not compatible with the operation being performed. This can be |
212 // NULL, in which case |initiating_profile| must be provided. | 213 // NULL, in which case |initiating_profile| must be provided. |
213 // [out] Specifies the Browser object where the navigation occurred or the | 214 // [out] Specifies the Browser object where the navigation occurred or the |
214 // tab was added. Guaranteed non-NULL unless the disposition did not | 215 // tab was added. Guaranteed non-NULL unless the disposition did not |
215 // require a navigation, in which case this is set to NULL | 216 // require a navigation, in which case this is set to NULL |
216 // (SUPPRESS_OPEN, SAVE_TO_DISK, IGNORE_ACTION). | 217 // (SUPPRESS_OPEN, SAVE_TO_DISK, IGNORE_ACTION). |
217 // Note: If |show_window| is set to false and a new Browser is created by | 218 // Note: If |show_window| is set to false and a new Browser is created by |
218 // Navigate(), the caller is responsible for showing it so that its | 219 // Navigate(), the caller is responsible for showing it so that its |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 NavigateParams(); | 253 NavigateParams(); |
253 }; | 254 }; |
254 | 255 |
255 // Copies fields from |params| struct to |nav_params| struct. | 256 // Copies fields from |params| struct to |nav_params| struct. |
256 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, | 257 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, |
257 const content::OpenURLParams& params); | 258 const content::OpenURLParams& params); |
258 | 259 |
259 } // namespace chrome | 260 } // namespace chrome |
260 | 261 |
261 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ | 262 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ |
OLD | NEW |