Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_WRAPPER_H_ | 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/property_bag.h" | 13 #include "base/property_bag.h" |
| 14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
| 15 | 15 |
| 16 class AlternateErrorPageTabObserver; | 16 class AlternateErrorPageTabObserver; |
| 17 class AutocompleteHistoryManager; | 17 class AutocompleteHistoryManager; |
| 18 class AutofillManager; | 18 class AutofillManager; |
| 19 class AutofillExternalDelegate; | 19 class AutofillExternalDelegate; |
| 20 class AutomationTabHelper; | 20 class AutomationTabHelper; |
| 21 class BlockedContentTabHelper; | 21 class BlockedContentTabHelper; |
| 22 class BookmarkTabHelper; | 22 class BookmarkTabHelper; |
| 23 class ConstrainedWindowTabHelper; | 23 class ConstrainedWindowTabHelper; |
| 24 class CoreTabHelper; | 24 class CoreTabHelper; |
| 25 class DownloadRequestLimiterObserver; | |
| 26 class ExtensionTabHelper; | 25 class ExtensionTabHelper; |
| 27 class ExternalProtocolObserver; | 26 class ExternalProtocolObserver; |
| 28 class FaviconTabHelper; | 27 class FaviconTabHelper; |
| 29 class FindTabHelper; | 28 class FindTabHelper; |
| 30 class HistoryTabHelper; | 29 class HistoryTabHelper; |
| 31 class HungPluginTabHelper; | 30 class HungPluginTabHelper; |
| 32 class InfoBarTabHelper; | 31 class InfoBarTabHelper; |
| 33 class OmniboxSearchHint; | 32 class OmniboxSearchHint; |
| 34 class PasswordManager; | 33 class PasswordManager; |
| 35 class PasswordManagerDelegate; | 34 class PasswordManagerDelegate; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 259 | 258 |
| 260 scoped_ptr<ThumbnailGenerator> thumbnail_generator_; | 259 scoped_ptr<ThumbnailGenerator> thumbnail_generator_; |
| 261 scoped_ptr<TranslateTabHelper> translate_tab_helper_; | 260 scoped_ptr<TranslateTabHelper> translate_tab_helper_; |
| 262 | 261 |
| 263 // Handles displaying a web intents picker to the user. | 262 // Handles displaying a web intents picker to the user. |
| 264 scoped_ptr<WebIntentPickerController> web_intent_picker_controller_; | 263 scoped_ptr<WebIntentPickerController> web_intent_picker_controller_; |
| 265 | 264 |
| 266 // Per-tab observers --------------------------------------------------------- | 265 // Per-tab observers --------------------------------------------------------- |
| 267 // (These provide no API for callers; objects that need to exist 1:1 with tabs | 266 // (These provide no API for callers; objects that need to exist 1:1 with tabs |
| 268 // and silently do their thing live here.) | 267 // and silently do their thing live here.) |
| 268 // | |
| 269 // WARNING: Not every place where HTML can run has a TabContentsWrapper. This | |
| 270 // class is *only* used in a visible, actual, tab inside a browser. Examples | |
| 271 // of things that do not have tab wrappers include: | |
| 272 // - Extension background pages and popup bubbles | |
| 273 // - HTML notification bubbles | |
| 274 // - Screensavers on Chrome OS | |
| 275 // - Other random places we decide to display HTML over time | |
| 276 // | |
| 277 // Consider carefully whether your feature is something that makes sense only | |
| 278 // when a tab is displayed, or could make sense in other cases we use HTML. It | |
| 279 // may makes sense to push down into WebContents and make configurable, or at | |
| 280 // least to make easy for other WebContents hosts to include and support. | |
|
Avi (use Gerrit)
2012/05/25 20:44:56
Move the comment up to be a class comment, line 76
benjhayden
2012/05/25 21:00:50
Done.
| |
| 269 | 281 |
| 270 scoped_ptr<AlternateErrorPageTabObserver> alternate_error_page_tab_observer_; | 282 scoped_ptr<AlternateErrorPageTabObserver> alternate_error_page_tab_observer_; |
| 271 scoped_ptr<DownloadRequestLimiterObserver> download_request_limiter_observer_; | |
| 272 scoped_ptr<extensions::WebNavigationTabObserver> webnavigation_observer_; | 283 scoped_ptr<extensions::WebNavigationTabObserver> webnavigation_observer_; |
| 273 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_; | 284 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_; |
| 274 scoped_ptr<OmniboxSearchHint> omnibox_search_hint_; | 285 scoped_ptr<OmniboxSearchHint> omnibox_search_hint_; |
| 275 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 286 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 276 scoped_ptr<OneClickSigninHelper> one_click_signin_helper_; | 287 scoped_ptr<OneClickSigninHelper> one_click_signin_helper_; |
| 277 #endif | 288 #endif |
| 278 scoped_ptr<PDFTabObserver> pdf_tab_observer_; | 289 scoped_ptr<PDFTabObserver> pdf_tab_observer_; |
| 279 scoped_ptr<PluginObserver> plugin_observer_; | 290 scoped_ptr<PluginObserver> plugin_observer_; |
| 280 scoped_ptr<printing::PrintPreviewMessageHandler> print_preview_; | 291 scoped_ptr<printing::PrintPreviewMessageHandler> print_preview_; |
| 281 scoped_ptr<safe_browsing::SafeBrowsingTabObserver> | 292 scoped_ptr<safe_browsing::SafeBrowsingTabObserver> |
| 282 safe_browsing_tab_observer_; | 293 safe_browsing_tab_observer_; |
| 283 | 294 |
| 284 // WebContents (MUST BE LAST) ------------------------------------------------ | 295 // WebContents (MUST BE LAST) ------------------------------------------------ |
| 285 | 296 |
| 286 // If true, we're running the destructor. | 297 // If true, we're running the destructor. |
| 287 bool in_destructor_; | 298 bool in_destructor_; |
| 288 | 299 |
| 289 // The supporting objects need to outlive the WebContents dtor (as they may | 300 // The supporting objects need to outlive the WebContents dtor (as they may |
| 290 // be called upon during its execution). As a result, this must come last | 301 // be called upon during its execution). As a result, this must come last |
| 291 // in the list. | 302 // in the list. |
| 292 scoped_ptr<content::WebContents> web_contents_; | 303 scoped_ptr<content::WebContents> web_contents_; |
| 293 | 304 |
| 294 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); | 305 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); |
| 295 }; | 306 }; |
| 296 | 307 |
| 297 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 308 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| OLD | NEW |