Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: chrome/browser/ui/browser_navigator.h

Issue 10696222: Make chrome::Navigate take in a Browser* that is never NULL. That function doesn't have a context, … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/platform_util_chromeos.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/public/browser/global_request_id.h" 10 #include "content/public/browser/global_request_id.h"
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 "content/public/common/referrer.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 #include "webkit/glue/window_open_disposition.h" 15 #include "webkit/glue/window_open_disposition.h"
16 16
17 class Browser; 17 class Browser;
18 class Profile;
19 class TabContents; 18 class TabContents;
20 19
21 namespace chrome { 20 namespace chrome {
22 21
23 // Parameters that tell Navigate() what to do. 22 // Parameters that tell Navigate() what to do.
24 // 23 //
25 // Some basic examples: 24 // Some basic examples:
26 // 25 //
27 // Simple Navigate to URL in current tab: 26 // Simple Navigate to URL in current tab:
28 // chrome::NavigateParams params(browser, GURL("http://www.google.com/"), 27 // chrome::NavigateParams params(browser, GURL("http://www.google.com/"),
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Two URLs with differing refs are same. 159 // Two URLs with differing refs are same.
161 IGNORE_REF, 160 IGNORE_REF,
162 // Two URLs with differing refs are different. 161 // Two URLs with differing refs are different.
163 RESPECT_REF, 162 RESPECT_REF,
164 }; 163 };
165 // Default is IGNORE. 164 // Default is IGNORE.
166 RefBehavior ref_behavior; 165 RefBehavior ref_behavior;
167 166
168 // [in] Specifies a Browser object where the navigation could occur or the 167 // [in] Specifies a Browser object where the navigation could occur or the
169 // tab could be added. Navigate() is not obliged to use this Browser if 168 // tab could be added. Navigate() is not obliged to use this Browser if
170 // it is not compatible with the operation being performed. If NULL, 169 // it is not compatible with the operation being performed.
171 // |profile| should be specified to find or create a matching Browser.
172 // [out] Specifies the Browser object where the navigation occurred or the 170 // [out] Specifies the Browser object where the navigation occurred or the
173 // tab was added. Guaranteed non-NULL unless the disposition did not 171 // tab was added. Guaranteed non-NULL unless the disposition did not
174 // require a navigation, in which case this is set to NULL 172 // require a navigation, in which case this is set to NULL
175 // (SUPPRESS_OPEN, SAVE_TO_DISK, IGNORE_ACTION). 173 // (SUPPRESS_OPEN, SAVE_TO_DISK, IGNORE_ACTION).
176 // Note: If |show_window| is set to false and a new Browser is created by 174 // Note: If |show_window| is set to false and a new Browser is created by
177 // Navigate(), the caller is responsible for showing it so that its 175 // Navigate(), the caller is responsible for showing it so that its
178 // window can assume responsibility for the Browser's lifetime (Browser 176 // window can assume responsibility for the Browser's lifetime (Browser
179 // objects are deleted when the user closes a visible browser window). 177 // objects are deleted when the user closes a visible browser window).
180 Browser* browser; 178 Browser* browser;
181 179
182 // If |browser| == NULL, specifies a Profile to use when finding or
183 // creating a Browser.
184 Profile* profile;
185
186 // Refers to a navigation that was parked in the browser in order to be 180 // Refers to a navigation that was parked in the browser in order to be
187 // transferred to another RVH. Only used in case of a redirection of a request 181 // transferred to another RVH. Only used in case of a redirection of a request
188 // to a different site that created a new RVH. 182 // to a different site that created a new RVH.
189 content::GlobalRequestID transferred_global_request_id; 183 content::GlobalRequestID transferred_global_request_id;
190 184
191 private: 185 private:
192 NavigateParams(); 186 NavigateParams();
193 }; 187 };
194 188
195 // Navigates according to the configuration specified in |params|. 189 // Navigates according to the configuration specified in |params|.
196 void Navigate(NavigateParams* params); 190 void Navigate(NavigateParams* params);
197 191
198 // Returns true if the url is allowed to open in incognito window. 192 // Returns true if the url is allowed to open in incognito window.
199 bool IsURLAllowedInIncognito(const GURL& url); 193 bool IsURLAllowedInIncognito(const GURL& url);
200 194
201 } // namespace chrome 195 } // namespace chrome
202 196
203 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ 197 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_chromeos.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698