Chromium Code Reviews| 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" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 // not added to a TabStripModel before Navigate() returns. | 82 // not added to a TabStripModel before Navigate() returns. |
| 83 content::WebContents* target_contents; | 83 content::WebContents* target_contents; |
| 84 | 84 |
| 85 // [in] The WebContents that initiated the Navigate() request if such | 85 // [in] The WebContents that initiated the Navigate() request if such |
| 86 // context is necessary. Default is NULL, i.e. no context. | 86 // context is necessary. Default is NULL, i.e. no context. |
| 87 // [out] If NULL, this value will be set to the selected WebContents in | 87 // [out] If NULL, this value will be set to the selected WebContents in |
| 88 // the originating browser prior to the operation performed by | 88 // the originating browser prior to the operation performed by |
| 89 // Navigate(). However, if the originating page is from a different | 89 // Navigate(). However, if the originating page is from a different |
| 90 // profile (e.g. an OFF_THE_RECORD page originating from a non-OTR | 90 // profile (e.g. an OFF_THE_RECORD page originating from a non-OTR |
| 91 // window), then |source_contents| is reset to NULL. | 91 // window), then |source_contents| is reset to NULL. |
| 92 content::WebContents* source_contents; | 92 content::WebContents* source_contents; |
|
Charlie Reis
2013/08/01 18:13:34
Perhaps add content::WebContents* opener_contents
| |
| 93 | 93 |
| 94 // The disposition requested by the navigation source. Default is | 94 // The disposition requested by the navigation source. Default is |
| 95 // CURRENT_TAB. What follows is a set of coercions that happen to this value | 95 // CURRENT_TAB. What follows is a set of coercions that happen to this value |
| 96 // when other factors are at play: | 96 // when other factors are at play: |
| 97 // | 97 // |
| 98 // [in]: Condition: [out]: | 98 // [in]: Condition: [out]: |
| 99 // NEW_BACKGROUND_TAB target browser tabstrip is empty NEW_FOREGROUND_TAB | 99 // NEW_BACKGROUND_TAB target browser tabstrip is empty NEW_FOREGROUND_TAB |
| 100 // CURRENT_TAB " " " NEW_FOREGROUND_TAB | 100 // CURRENT_TAB " " " NEW_FOREGROUND_TAB |
| 101 // OFF_THE_RECORD target browser profile is incog. NEW_FOREGROUND_TAB | 101 // OFF_THE_RECORD target browser profile is incog. NEW_FOREGROUND_TAB |
| 102 // | 102 // |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 content::GlobalRequestID transferred_global_request_id; | 205 content::GlobalRequestID transferred_global_request_id; |
| 206 | 206 |
| 207 // Refers to which desktop this navigation should occur on. May be passed | 207 // Refers to which desktop this navigation should occur on. May be passed |
| 208 // explicitly or inferred from an existing Browser instance. | 208 // explicitly or inferred from an existing Browser instance. |
| 209 chrome::HostDesktopType host_desktop_type; | 209 chrome::HostDesktopType host_desktop_type; |
| 210 | 210 |
| 211 // Indicates whether this navigation should replace the current | 211 // Indicates whether this navigation should replace the current |
| 212 // navigation entry. | 212 // navigation entry. |
| 213 bool should_replace_current_entry; | 213 bool should_replace_current_entry; |
| 214 | 214 |
| 215 // Indicates whether |source_contents| should be set as opener when creating | |
| 216 // |target_contents|. | |
| 217 bool should_set_opener; | |
| 218 | |
| 215 private: | 219 private: |
| 216 NavigateParams(); | 220 NavigateParams(); |
| 217 }; | 221 }; |
| 218 | 222 |
| 219 // Copies fields from |params| struct to |nav_params| struct. | 223 // Copies fields from |params| struct to |nav_params| struct. |
| 220 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, | 224 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, |
| 221 const content::OpenURLParams& params); | 225 const content::OpenURLParams& params); |
| 222 | 226 |
| 223 // Navigates according to the configuration specified in |params|. | 227 // Navigates according to the configuration specified in |params|. |
| 224 void Navigate(NavigateParams* params); | 228 void Navigate(NavigateParams* params); |
| 225 | 229 |
| 226 // Returns true if the url is allowed to open in incognito window. | 230 // Returns true if the url is allowed to open in incognito window. |
| 227 bool IsURLAllowedInIncognito(const GURL& url, | 231 bool IsURLAllowedInIncognito(const GURL& url, |
| 228 content::BrowserContext* browser_context); | 232 content::BrowserContext* browser_context); |
| 229 | 233 |
| 230 } // namespace chrome | 234 } // namespace chrome |
| 231 | 235 |
| 232 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 236 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
| OLD | NEW |