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