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

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

Issue 10959054: Switch ZoomTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class ThumbnailGenerator; 53 class ThumbnailGenerator;
54 class TranslateTabHelper; 54 class TranslateTabHelper;
55 class TranslationInfoBarTestContentsCreator; 55 class TranslationInfoBarTestContentsCreator;
56 class WebDialogGtk; 56 class WebDialogGtk;
57 class WebDialogWindowControllerTabContentsCreator; 57 class WebDialogWindowControllerTabContentsCreator;
58 class WebIntentInlineDispositionBrowserTest; 58 class WebIntentInlineDispositionBrowserTest;
59 class WebIntentPickerCocoa; 59 class WebIntentPickerCocoa;
60 class WebIntentPickerController; 60 class WebIntentPickerController;
61 class WebIntentPickerGtk; 61 class WebIntentPickerGtk;
62 class WebUITestContentsCreator; 62 class WebUITestContentsCreator;
63 class ZoomController;
64 63
65 namespace browser_sync { 64 namespace browser_sync {
66 class SyncedTabDelegate; 65 class SyncedTabDelegate;
67 } 66 }
68 67
69 namespace chromeos { 68 namespace chromeos {
70 class SimpleWebViewDialog; 69 class SimpleWebViewDialog;
71 class WebUILoginView; 70 class WebUILoginView;
72 } 71 }
73 72
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 208 }
210 209
211 TranslateTabHelper* translate_tab_helper() { 210 TranslateTabHelper* translate_tab_helper() {
212 return translate_tab_helper_.get(); 211 return translate_tab_helper_.get();
213 } 212 }
214 213
215 WebIntentPickerController* web_intent_picker_controller() { 214 WebIntentPickerController* web_intent_picker_controller() {
216 return web_intent_picker_controller_.get(); 215 return web_intent_picker_controller_.get();
217 } 216 }
218 217
219 ZoomController* zoom_controller() {
220 return zoom_controller_.get();
221 }
222
223 // Overrides ----------------------------------------------------------------- 218 // Overrides -----------------------------------------------------------------
224 219
225 // content::WebContentsObserver overrides: 220 // content::WebContentsObserver overrides:
226 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; 221 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE;
227 222
228 private: 223 private:
229 friend class TabContentsFactory; 224 friend class TabContentsFactory;
230 225
231 // Takes ownership of |contents|, which must be heap-allocated (as it lives 226 // Takes ownership of |contents|, which must be heap-allocated (as it lives
232 // in a scoped_ptr) and can not be NULL. 227 // in a scoped_ptr) and can not be NULL.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // The TabSpecificContentSettings object is used to query the blocked content 260 // The TabSpecificContentSettings object is used to query the blocked content
266 // state by various UI elements. 261 // state by various UI elements.
267 scoped_ptr<TabSpecificContentSettings> content_settings_; 262 scoped_ptr<TabSpecificContentSettings> content_settings_;
268 263
269 scoped_ptr<ThumbnailGenerator> thumbnail_generator_; 264 scoped_ptr<ThumbnailGenerator> thumbnail_generator_;
270 scoped_ptr<TranslateTabHelper> translate_tab_helper_; 265 scoped_ptr<TranslateTabHelper> translate_tab_helper_;
271 266
272 // Handles displaying a web intents picker to the user. 267 // Handles displaying a web intents picker to the user.
273 scoped_ptr<WebIntentPickerController> web_intent_picker_controller_; 268 scoped_ptr<WebIntentPickerController> web_intent_picker_controller_;
274 269
275 scoped_ptr<ZoomController> zoom_controller_;
276
277 // Per-tab observers --------------------------------------------------------- 270 // Per-tab observers ---------------------------------------------------------
278 // (These provide no API for callers; objects that need to exist 1:1 with tabs 271 // (These provide no API for callers; objects that need to exist 1:1 with tabs
279 // and silently do their thing live here.) 272 // and silently do their thing live here.)
280 273
281 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_; 274 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_;
282 scoped_ptr<NavigationMetricsRecorder> navigation_metrics_recorder_; 275 scoped_ptr<NavigationMetricsRecorder> navigation_metrics_recorder_;
283 scoped_ptr<PepperBrokerObserver> pepper_broker_observer_; 276 scoped_ptr<PepperBrokerObserver> pepper_broker_observer_;
284 scoped_ptr<PluginObserver> plugin_observer_; 277 scoped_ptr<PluginObserver> plugin_observer_;
285 scoped_ptr<safe_browsing::SafeBrowsingTabObserver> 278 scoped_ptr<safe_browsing::SafeBrowsingTabObserver>
286 safe_browsing_tab_observer_; 279 safe_browsing_tab_observer_;
287 280
288 // WebContents (MUST BE LAST) ------------------------------------------------ 281 // WebContents (MUST BE LAST) ------------------------------------------------
289 282
290 // If true, we're running the destructor. 283 // If true, we're running the destructor.
291 bool in_destructor_; 284 bool in_destructor_;
292 285
293 // The supporting objects need to outlive the WebContents dtor (as they may 286 // The supporting objects need to outlive the WebContents dtor (as they may
294 // be called upon during its execution). As a result, this must come last 287 // be called upon during its execution). As a result, this must come last
295 // in the list. 288 // in the list.
296 scoped_ptr<content::WebContents> web_contents_; 289 scoped_ptr<content::WebContents> web_contents_;
297 290
298 DISALLOW_COPY_AND_ASSIGN(TabContents); 291 DISALLOW_COPY_AND_ASSIGN(TabContents);
299 }; 292 };
300 293
301 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ 294 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/zoom_bubble_gtk.cc ('k') | chrome/browser/ui/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698