| 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" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/ref_counted_memory.h" | 11 #include "base/memory/ref_counted_memory.h" |
| 12 #include "chrome/browser/ui/host_desktop.h" | 12 #include "chrome/browser/ui/host_desktop.h" |
| 13 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
| 14 #include "content/public/browser/global_request_id.h" | 14 #include "content/public/browser/global_request_id.h" |
| 15 #include "content/public/browser/page_navigator.h" | 15 #include "content/public/browser/page_navigator.h" |
| 16 #include "content/public/browser/site_instance.h" |
| 16 #include "content/public/common/referrer.h" | 17 #include "content/public/common/referrer.h" |
| 17 #include "ui/base/page_transition_types.h" | 18 #include "ui/base/page_transition_types.h" |
| 18 #include "ui/base/window_open_disposition.h" | 19 #include "ui/base/window_open_disposition.h" |
| 19 #include "ui/gfx/rect.h" | 20 #include "ui/gfx/rect.h" |
| 20 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 21 | 22 |
| 22 class Browser; | 23 class Browser; |
| 23 class Profile; | 24 class Profile; |
| 24 | 25 |
| 25 namespace content { | 26 namespace content { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 chrome::HostDesktopType host_desktop_type; | 228 chrome::HostDesktopType host_desktop_type; |
| 228 | 229 |
| 229 // Indicates whether this navigation should replace the current | 230 // Indicates whether this navigation should replace the current |
| 230 // navigation entry. | 231 // navigation entry. |
| 231 bool should_replace_current_entry; | 232 bool should_replace_current_entry; |
| 232 | 233 |
| 233 // Indicates whether |source_contents| should be set as opener when creating | 234 // Indicates whether |source_contents| should be set as opener when creating |
| 234 // |target_contents|. | 235 // |target_contents|. |
| 235 bool should_set_opener; | 236 bool should_set_opener; |
| 236 | 237 |
| 238 // SiteInstance of the frame that initiated the navigation or null if we |
| 239 // don't know it. This should be assigned from the OpenURLParams of the |
| 240 // WebContentsDelegate::OpenURLFromTab implementation and is used to determine |
| 241 // the SiteInstance that will be used for the resulting frame in the case of |
| 242 // an about:blank or a data url navigation. |
| 243 scoped_refptr<content::SiteInstance> source_site_instance; |
| 244 |
| 237 private: | 245 private: |
| 238 NavigateParams(); | 246 NavigateParams(); |
| 239 }; | 247 }; |
| 240 | 248 |
| 241 // Copies fields from |params| struct to |nav_params| struct. | 249 // Copies fields from |params| struct to |nav_params| struct. |
| 242 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, | 250 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, |
| 243 const content::OpenURLParams& params); | 251 const content::OpenURLParams& params); |
| 244 | 252 |
| 245 // Navigates according to the configuration specified in |params|. | 253 // Navigates according to the configuration specified in |params|. |
| 246 void Navigate(NavigateParams* params); | 254 void Navigate(NavigateParams* params); |
| 247 | 255 |
| 248 // Returns true if the url is allowed to open in incognito window. | 256 // Returns true if the url is allowed to open in incognito window. |
| 249 bool IsURLAllowedInIncognito(const GURL& url, | 257 bool IsURLAllowedInIncognito(const GURL& url, |
| 250 content::BrowserContext* browser_context); | 258 content::BrowserContext* browser_context); |
| 251 | 259 |
| 252 } // namespace chrome | 260 } // namespace chrome |
| 253 | 261 |
| 254 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 262 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
| OLD | NEW |