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

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

Issue 11030004: Switch TabContentsSyncedTabDelegate to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dtor check 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"
(...skipping 27 matching lines...) Expand all
38 class TabStripModelContentsCreator; 38 class TabStripModelContentsCreator;
39 class ThumbnailGenerator; 39 class ThumbnailGenerator;
40 class TranslationInfoBarTestContentsCreator; 40 class TranslationInfoBarTestContentsCreator;
41 class WebDialogGtk; 41 class WebDialogGtk;
42 class WebDialogWindowControllerTabContentsCreator; 42 class WebDialogWindowControllerTabContentsCreator;
43 class WebIntentInlineDispositionBrowserTest; 43 class WebIntentInlineDispositionBrowserTest;
44 class WebIntentPickerCocoa; 44 class WebIntentPickerCocoa;
45 class WebIntentPickerGtk; 45 class WebIntentPickerGtk;
46 class WebUITestContentsCreator; 46 class WebUITestContentsCreator;
47 47
48 namespace browser_sync {
49 class SyncedTabDelegate;
50 }
51
52 namespace chromeos { 48 namespace chromeos {
53 class SimpleWebViewDialog; 49 class SimpleWebViewDialog;
54 class WebUILoginView; 50 class WebUILoginView;
55 } 51 }
56 52
57 namespace extensions { 53 namespace extensions {
58 class WebAuthFlow; 54 class WebAuthFlow;
59 } 55 }
60 56
61 namespace prerender { 57 namespace prerender {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 bool in_destructor() const { return in_destructor_; } 138 bool in_destructor() const { return in_destructor_; }
143 139
144 // Tab Helpers --------------------------------------------------------------- 140 // Tab Helpers ---------------------------------------------------------------
145 141
146 AutofillManager* autofill_manager() { return autofill_manager_.get(); } 142 AutofillManager* autofill_manager() { return autofill_manager_.get(); }
147 143
148 InfoBarTabHelper* infobar_tab_helper() { return infobar_tab_helper_.get(); } 144 InfoBarTabHelper* infobar_tab_helper() { return infobar_tab_helper_.get(); }
149 145
150 PasswordManager* password_manager() { return password_manager_.get(); } 146 PasswordManager* password_manager() { return password_manager_.get(); }
151 147
152 browser_sync::SyncedTabDelegate* synced_tab_delegate() {
153 return synced_tab_delegate_.get();
154 }
155
156 // NOTE: This returns NULL unless in-browser thumbnail generation is enabled. 148 // NOTE: This returns NULL unless in-browser thumbnail generation is enabled.
157 ThumbnailGenerator* thumbnail_generator() { 149 ThumbnailGenerator* thumbnail_generator() {
158 return thumbnail_generator_.get(); 150 return thumbnail_generator_.get();
159 } 151 }
160 152
161 // Overrides ----------------------------------------------------------------- 153 // Overrides -----------------------------------------------------------------
162 154
163 // content::WebContentsObserver overrides: 155 // content::WebContentsObserver overrides:
164 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; 156 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE;
165 157
(...skipping 14 matching lines...) Expand all
180 172
181 scoped_refptr<AutofillManager> autofill_manager_; 173 scoped_refptr<AutofillManager> autofill_manager_;
182 scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_; 174 scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_;
183 scoped_ptr<InfoBarTabHelper> infobar_tab_helper_; 175 scoped_ptr<InfoBarTabHelper> infobar_tab_helper_;
184 176
185 // PasswordManager and its delegate. The delegate must outlive the manager, 177 // PasswordManager and its delegate. The delegate must outlive the manager,
186 // per documentation in password_manager.h. 178 // per documentation in password_manager.h.
187 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_; 179 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_;
188 scoped_ptr<PasswordManager> password_manager_; 180 scoped_ptr<PasswordManager> password_manager_;
189 181
190 scoped_ptr<browser_sync::SyncedTabDelegate> synced_tab_delegate_;
191
192 scoped_ptr<ThumbnailGenerator> thumbnail_generator_; 182 scoped_ptr<ThumbnailGenerator> thumbnail_generator_;
193 183
194 // WebContents (MUST BE LAST) ------------------------------------------------ 184 // WebContents (MUST BE LAST) ------------------------------------------------
195 185
196 // If true, we're running the destructor. 186 // If true, we're running the destructor.
197 bool in_destructor_; 187 bool in_destructor_;
198 188
199 // The supporting objects need to outlive the WebContents dtor (as they may 189 // The supporting objects need to outlive the WebContents dtor (as they may
200 // be called upon during its execution). As a result, this must come last 190 // be called upon during its execution). As a result, this must come last
201 // in the list. 191 // in the list.
202 scoped_ptr<content::WebContents> web_contents_; 192 scoped_ptr<content::WebContents> web_contents_;
203 193
204 DISALLOW_COPY_AND_ASSIGN(TabContents); 194 DISALLOW_COPY_AND_ASSIGN(TabContents);
205 }; 195 };
206 196
207 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ 197 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698