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

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

Issue 10105030: TabContents -> WebContentsImpl, part 21. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/ui/browser_list.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) 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
(...skipping 17 matching lines...) Expand all
28 // Simple Navigate to URL in current tab: 28 // Simple Navigate to URL in current tab:
29 // browser::NavigateParams params(browser, GURL("http://www.google.com/"), 29 // browser::NavigateParams params(browser, GURL("http://www.google.com/"),
30 // PageTransition::LINK); 30 // PageTransition::LINK);
31 // browser::Navigate(&params); 31 // browser::Navigate(&params);
32 // 32 //
33 // Open bookmark in new background tab: 33 // Open bookmark in new background tab:
34 // browser::NavigateParams params(browser, url, PageTransition::AUTO_BOOKMARK); 34 // browser::NavigateParams params(browser, url, PageTransition::AUTO_BOOKMARK);
35 // params.disposition = NEW_BACKGROUND_TAB; 35 // params.disposition = NEW_BACKGROUND_TAB;
36 // browser::Navigate(&params); 36 // browser::Navigate(&params);
37 // 37 //
38 // Opens a popup TabContents: 38 // Opens a popup TabContentsWrapper:
39 // browser::NavigateParams params(browser, popup_contents); 39 // browser::NavigateParams params(browser, popup_contents);
40 // params.source_contents = source_contents; 40 // params.source_contents = source_contents;
41 // browser::Navigate(&params); 41 // browser::Navigate(&params);
42 // 42 //
43 // See browser_navigator_browsertest.cc for more examples. 43 // See browser_navigator_browsertest.cc for more examples.
44 // 44 //
45 struct NavigateParams { 45 struct NavigateParams {
46 NavigateParams(Browser* browser, 46 NavigateParams(Browser* browser,
47 const GURL& a_url, 47 const GURL& a_url,
48 content::PageTransition a_transition); 48 content::PageTransition a_transition);
49 NavigateParams(Browser* browser, TabContentsWrapper* a_target_contents); 49 NavigateParams(Browser* browser, TabContentsWrapper* a_target_contents);
50 ~NavigateParams(); 50 ~NavigateParams();
51 51
52 // 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.
53 GURL url; 53 GURL url;
54 content::Referrer referrer; 54 content::Referrer referrer;
55 55
56 // [in] A TabContents to be navigated or inserted into the target Browser's 56 // [in] A TabContentsWrapper to be navigated or inserted into the target
57 // tabstrip. If NULL, |url| or the homepage will be used instead. When 57 // Browser's tabstrip. If NULL, |url| or the homepage will be used
58 // non-NULL, Navigate() assumes it has already been navigated to its 58 // instead. When non-NULL, Navigate() assumes it has already been
59 // intended destination and will not load any URL in it (i.e. |url| is 59 // navigated to its intended destination and will not load any URL in it
60 // ignored). 60 // (i.e. |url| is ignored).
61 // Default is NULL. 61 // Default is NULL.
62 // [out] The TabContents in which the navigation occurred or that was 62 // [out] The TabContentsWrapper in which the navigation occurred or that was
63 // inserted. Guaranteed non-NULL except for note below: 63 // inserted. Guaranteed non-NULL except for note below:
64 // 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
65 // a new TabContents, this field will remain NULL and the TabContents 65 // a new TabContentsWrapper, this field will remain NULL and the
66 // deleted if the TabContents it created is not added to a TabStripModel 66 // TabContentsWrapper deleted if the TabContentsWrapper it created is
67 // before Navigate() returns. 67 // not added to a TabStripModel before Navigate() returns.
68 TabContentsWrapper* target_contents; 68 TabContentsWrapper* target_contents;
69 69
70 // [in] The TabContents that initiated the Navigate() request if such context 70 // [in] The TabContentsWrapper that initiated the Navigate() request if such
71 // is necessary. Default is NULL, i.e. no context. 71 // context is necessary. Default is NULL, i.e. no context.
72 // [out] If NULL, this value will be set to the selected TabContents in the 72 // [out] If NULL, this value will be set to the selected TabContentsWrapper in
73 // originating browser prior to the operation performed by Navigate(). 73 // the originating browser prior to the operation performed by
74 // However, if the originating page is from a different profile (e.g. an 74 // Navigate(). However, if the originating page is from a different
75 // OFF_THE_RECORD page originating from a non-OTR window), then 75 // profile (e.g. an OFF_THE_RECORD page originating from a non-OTR
76 // |source_contents| is reset to NULL. 76 // window), then |source_contents| is reset to NULL.
77 TabContentsWrapper* source_contents; 77 TabContentsWrapper* source_contents;
78 78
79 // The disposition requested by the navigation source. Default is 79 // The disposition requested by the navigation source. Default is
80 // CURRENT_TAB. What follows is a set of coercions that happen to this value 80 // CURRENT_TAB. What follows is a set of coercions that happen to this value
81 // when other factors are at play: 81 // when other factors are at play:
82 // 82 //
83 // [in]: Condition: [out]: 83 // [in]: Condition: [out]:
84 // NEW_BACKGROUND_TAB target browser tabstrip is empty NEW_FOREGROUND_TAB 84 // NEW_BACKGROUND_TAB target browser tabstrip is empty NEW_FOREGROUND_TAB
85 // CURRENT_TAB " " " NEW_FOREGROUND_TAB 85 // CURRENT_TAB " " " NEW_FOREGROUND_TAB
86 // OFF_THE_RECORD target browser profile is incog. NEW_FOREGROUND_TAB 86 // OFF_THE_RECORD target browser profile is incog. NEW_FOREGROUND_TAB
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 #if defined(OS_CHROMEOS) || defined(USE_AURA) 204 #if defined(OS_CHROMEOS) || defined(USE_AURA)
205 // Returns NEW_FOREGROUND_TAB if popup_bounds exceeds a specified percentage 205 // Returns NEW_FOREGROUND_TAB if popup_bounds exceeds a specified percentage
206 // of the window size, otherwise returns NEW_POPUP. 206 // of the window size, otherwise returns NEW_POPUP.
207 WindowOpenDisposition DispositionForPopupBounds( 207 WindowOpenDisposition DispositionForPopupBounds(
208 const gfx::Rect& popup_bounds, int window_width, int window_height); 208 const gfx::Rect& popup_bounds, int window_width, int window_height);
209 #endif 209 #endif
210 210
211 } // namespace browser 211 } // namespace browser
212 212
213 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_ 213 #endif // CHROME_BROWSER_UI_BROWSER_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_list.cc ('k') | chrome/browser/ui/browser_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698