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

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

Issue 10987100: Switch AutofillManager to be UserData on WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
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_TAB_CONTENTS_TAB_CONTENTS_H_ 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
13 #include "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
14 13
15 class AutofillExternalDelegate; 14 class AutofillExternalDelegate;
16 class AutofillManager;
17 class BasePanelBrowserTest; 15 class BasePanelBrowserTest;
18 class Browser; 16 class Browser;
19 class BrowserCommandsTabContentsCreator; 17 class BrowserCommandsTabContentsCreator;
20 class BrowserLauncherItemControllerContentsCreator; 18 class BrowserLauncherItemControllerContentsCreator;
21 class BrowserTabstripTabContentsCreator; 19 class BrowserTabstripTabContentsCreator;
22 class ChromeWebContentsHandler; 20 class ChromeWebContentsHandler;
23 class ConstrainedWebDialogDelegateBase; 21 class ConstrainedWebDialogDelegateBase;
24 class ConstrainedWindowTabHelper; 22 class ConstrainedWindowTabHelper;
25 class ExtensionTabUtil; 23 class ExtensionTabUtil;
26 class ExternalTabContainerWin; 24 class ExternalTabContainerWin;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 content::WebContents* web_contents() const; 141 content::WebContents* web_contents() const;
144 142
145 // Returns the Profile that is associated with this TabContents. 143 // Returns the Profile that is associated with this TabContents.
146 Profile* profile() const; 144 Profile* profile() const;
147 145
148 // True if this TabContents is being torn down. 146 // True if this TabContents is being torn down.
149 bool in_destructor() const { return in_destructor_; } 147 bool in_destructor() const { return in_destructor_; }
150 148
151 // Tab Helpers --------------------------------------------------------------- 149 // Tab Helpers ---------------------------------------------------------------
152 150
153 AutofillManager* autofill_manager() { return autofill_manager_.get(); }
154
155 ConstrainedWindowTabHelper* constrained_window_tab_helper() { 151 ConstrainedWindowTabHelper* constrained_window_tab_helper() {
156 return constrained_window_tab_helper_.get(); 152 return constrained_window_tab_helper_.get();
157 } 153 }
158 154
159 FaviconTabHelper* favicon_tab_helper() { return favicon_tab_helper_.get(); } 155 FaviconTabHelper* favicon_tab_helper() { return favicon_tab_helper_.get(); }
160 FindTabHelper* find_tab_helper() { return find_tab_helper_.get(); } 156 FindTabHelper* find_tab_helper() { return find_tab_helper_.get(); }
161 InfoBarTabHelper* infobar_tab_helper() { return infobar_tab_helper_.get(); } 157 InfoBarTabHelper* infobar_tab_helper() { return infobar_tab_helper_.get(); }
162 158
163 PasswordManager* password_manager() { return password_manager_.get(); } 159 PasswordManager* password_manager() { return password_manager_.get(); }
164 PrefsTabHelper* prefs_tab_helper() { return prefs_tab_helper_.get(); } 160 PrefsTabHelper* prefs_tab_helper() { return prefs_tab_helper_.get(); }
(...skipping 24 matching lines...) Expand all
189 explicit TabContents(content::WebContents* contents); 185 explicit TabContents(content::WebContents* contents);
190 186
191 // Create a TabContents with the same state as this one. The returned 187 // Create a TabContents with the same state as this one. The returned
192 // heap-allocated pointer is owned by the caller. 188 // heap-allocated pointer is owned by the caller.
193 TabContents* Clone(); 189 TabContents* Clone();
194 190
195 // Tab Helpers --------------------------------------------------------------- 191 // Tab Helpers ---------------------------------------------------------------
196 // (These provide API for callers and have a getter function listed in the 192 // (These provide API for callers and have a getter function listed in the
197 // "Tab Helpers" section in the member functions area, above.) 193 // "Tab Helpers" section in the member functions area, above.)
198 194
199 scoped_refptr<AutofillManager> autofill_manager_;
200 scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_; 195 scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_;
201 scoped_ptr<ConstrainedWindowTabHelper> constrained_window_tab_helper_; 196 scoped_ptr<ConstrainedWindowTabHelper> constrained_window_tab_helper_;
202 scoped_ptr<FaviconTabHelper> favicon_tab_helper_; 197 scoped_ptr<FaviconTabHelper> favicon_tab_helper_;
203 scoped_ptr<FindTabHelper> find_tab_helper_; 198 scoped_ptr<FindTabHelper> find_tab_helper_;
204 scoped_ptr<InfoBarTabHelper> infobar_tab_helper_; 199 scoped_ptr<InfoBarTabHelper> infobar_tab_helper_;
205 200
206 // PasswordManager and its delegate. The delegate must outlive the manager, 201 // PasswordManager and its delegate. The delegate must outlive the manager,
207 // per documentation in password_manager.h. 202 // per documentation in password_manager.h.
208 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_; 203 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_;
209 scoped_ptr<PasswordManager> password_manager_; 204 scoped_ptr<PasswordManager> password_manager_;
(...skipping 12 matching lines...) Expand all
222 217
223 // The supporting objects need to outlive the WebContents dtor (as they may 218 // The supporting objects need to outlive the WebContents dtor (as they may
224 // be called upon during its execution). As a result, this must come last 219 // be called upon during its execution). As a result, this must come last
225 // in the list. 220 // in the list.
226 scoped_ptr<content::WebContents> web_contents_; 221 scoped_ptr<content::WebContents> web_contents_;
227 222
228 DISALLOW_COPY_AND_ASSIGN(TabContents); 223 DISALLOW_COPY_AND_ASSIGN(TabContents);
229 }; 224 };
230 225
231 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ 226 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698