| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "content/browser/renderer_host/global_request_id.h" | 11 #include "content/browser/renderer_host/global_request_id.h" |
| 12 #include "content/public/common/page_transition_types.h" | 12 #include "content/public/common/page_transition_types.h" |
| 13 #include "content/public/common/referrer.h" |
| 13 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
| 14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
| 15 #include "webkit/glue/window_open_disposition.h" | 16 #include "webkit/glue/window_open_disposition.h" |
| 16 | 17 |
| 17 class Browser; | 18 class Browser; |
| 18 class Profile; | 19 class Profile; |
| 19 class TabContentsWrapper; | 20 class TabContentsWrapper; |
| 20 | 21 |
| 21 namespace browser { | 22 namespace browser { |
| 22 | 23 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 // | 44 // |
| 44 struct NavigateParams { | 45 struct NavigateParams { |
| 45 NavigateParams(Browser* browser, | 46 NavigateParams(Browser* browser, |
| 46 const GURL& a_url, | 47 const GURL& a_url, |
| 47 content::PageTransition a_transition); | 48 content::PageTransition a_transition); |
| 48 NavigateParams(Browser* browser, TabContentsWrapper* a_target_contents); | 49 NavigateParams(Browser* browser, TabContentsWrapper* a_target_contents); |
| 49 ~NavigateParams(); | 50 ~NavigateParams(); |
| 50 | 51 |
| 51 // The URL/referrer to be loaded. Ignored if |target_contents| is non-NULL. | 52 // The URL/referrer to be loaded. Ignored if |target_contents| is non-NULL. |
| 52 GURL url; | 53 GURL url; |
| 53 GURL referrer; | 54 content::Referrer referrer; |
| 54 | 55 |
| 55 // [in] A TabContents to be navigated or inserted into the target Browser's | 56 // [in] A TabContents to be navigated or inserted into the target Browser's |
| 56 // tabstrip. If NULL, |url| or the homepage will be used instead. When | 57 // tabstrip. If NULL, |url| or the homepage will be used instead. When |
| 57 // non-NULL, Navigate() assumes it has already been navigated to its | 58 // non-NULL, Navigate() assumes it has already been navigated to its |
| 58 // intended destination and will not load any URL in it (i.e. |url| is | 59 // intended destination and will not load any URL in it (i.e. |url| is |
| 59 // ignored). | 60 // ignored). |
| 60 // Default is NULL. | 61 // Default is NULL. |
| 61 // [out] The TabContents in which the navigation occurred or that was | 62 // [out] The TabContents in which the navigation occurred or that was |
| 62 // inserted. Guaranteed non-NULL except for note below: | 63 // inserted. Guaranteed non-NULL except for note below: |
| 63 // Note: If this field is set to NULL by the caller and Navigate() creates | 64 // Note: If this field is set to NULL by the caller and Navigate() creates |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // If the given navigational URL is a Singleton, return the tab index for it. | 197 // If the given navigational URL is a Singleton, return the tab index for it. |
| 197 // Otherwise, returns -1. | 198 // Otherwise, returns -1. |
| 198 int GetIndexOfSingletonTab(NavigateParams* params); | 199 int GetIndexOfSingletonTab(NavigateParams* params); |
| 199 | 200 |
| 200 // Returns true if the url is allowed to open in incognito window. | 201 // Returns true if the url is allowed to open in incognito window. |
| 201 bool IsURLAllowedInIncognito(const GURL& url); | 202 bool IsURLAllowedInIncognito(const GURL& url); |
| 202 | 203 |
| 203 } // namespace browser | 204 } // namespace browser |
| 204 | 205 |
| 205 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ | 206 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ |
| OLD | NEW |