| 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_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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 namespace extensions { | 98 namespace extensions { |
| 99 class WebAuthFlow; | 99 class WebAuthFlow; |
| 100 class WebNavigationTabObserver; | 100 class WebNavigationTabObserver; |
| 101 } | 101 } |
| 102 | 102 |
| 103 namespace prerender { | 103 namespace prerender { |
| 104 class PrerenderContents; | 104 class PrerenderContents; |
| 105 class PrerenderTabHelper; | 105 class PrerenderTabHelper; |
| 106 } | 106 } |
| 107 | 107 |
| 108 namespace printing { | |
| 109 class PrintViewManager; | |
| 110 class PrintPreviewMessageHandler; | |
| 111 } | |
| 112 | |
| 113 namespace safe_browsing { | 108 namespace safe_browsing { |
| 114 class SafeBrowsingTabObserver; | 109 class SafeBrowsingTabObserver; |
| 115 } | 110 } |
| 116 | 111 |
| 117 // Wraps WebContents and all of its supporting objects in order to control | 112 // Wraps WebContents and all of its supporting objects in order to control |
| 118 // their ownership and lifetime. | 113 // their ownership and lifetime. |
| 119 // | 114 // |
| 120 // WARNING: Not every place where HTML can run has a TabContents. This class is | 115 // WARNING: Not every place where HTML can run has a TabContents. This class is |
| 121 // *only* used in a visible, actual, tab inside a browser. Examples of things | 116 // *only* used in a visible, actual, tab inside a browser. Examples of things |
| 122 // that do not have a TabContents include: | 117 // that do not have a TabContents include: |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 235 } |
| 241 #endif | 236 #endif |
| 242 | 237 |
| 243 PasswordManager* password_manager() { return password_manager_.get(); } | 238 PasswordManager* password_manager() { return password_manager_.get(); } |
| 244 PrefsTabHelper* prefs_tab_helper() { return prefs_tab_helper_.get(); } | 239 PrefsTabHelper* prefs_tab_helper() { return prefs_tab_helper_.get(); } |
| 245 | 240 |
| 246 prerender::PrerenderTabHelper* prerender_tab_helper() { | 241 prerender::PrerenderTabHelper* prerender_tab_helper() { |
| 247 return prerender_tab_helper_.get(); | 242 return prerender_tab_helper_.get(); |
| 248 } | 243 } |
| 249 | 244 |
| 250 printing::PrintViewManager* print_view_manager() { | |
| 251 return print_view_manager_.get(); | |
| 252 } | |
| 253 | |
| 254 SadTabHelper* sad_tab_helper() { return sad_tab_helper_.get(); } | 245 SadTabHelper* sad_tab_helper() { return sad_tab_helper_.get(); } |
| 255 | 246 |
| 256 SearchEngineTabHelper* search_engine_tab_helper() { | 247 SearchEngineTabHelper* search_engine_tab_helper() { |
| 257 return search_engine_tab_helper_.get(); | 248 return search_engine_tab_helper_.get(); |
| 258 } | 249 } |
| 259 | 250 |
| 260 chrome::search::SearchTabHelper* search_tab_helper() { | 251 chrome::search::SearchTabHelper* search_tab_helper() { |
| 261 return search_tab_helper_.get(); | 252 return search_tab_helper_.get(); |
| 262 } | 253 } |
| 263 | 254 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 scoped_ptr<InfoBarTabHelper> infobar_tab_helper_; | 318 scoped_ptr<InfoBarTabHelper> infobar_tab_helper_; |
| 328 | 319 |
| 329 // PasswordManager and its delegate. The delegate must outlive the manager, | 320 // PasswordManager and its delegate. The delegate must outlive the manager, |
| 330 // per documentation in password_manager.h. | 321 // per documentation in password_manager.h. |
| 331 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_; | 322 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_; |
| 332 scoped_ptr<PasswordManager> password_manager_; | 323 scoped_ptr<PasswordManager> password_manager_; |
| 333 | 324 |
| 334 scoped_ptr<PrefsTabHelper> prefs_tab_helper_; | 325 scoped_ptr<PrefsTabHelper> prefs_tab_helper_; |
| 335 scoped_ptr<prerender::PrerenderTabHelper> prerender_tab_helper_; | 326 scoped_ptr<prerender::PrerenderTabHelper> prerender_tab_helper_; |
| 336 | 327 |
| 337 // Handles print job for this contents. | |
| 338 scoped_ptr<printing::PrintViewManager> print_view_manager_; | |
| 339 | |
| 340 scoped_ptr<SadTabHelper> sad_tab_helper_; | 328 scoped_ptr<SadTabHelper> sad_tab_helper_; |
| 341 scoped_ptr<SearchEngineTabHelper> search_engine_tab_helper_; | 329 scoped_ptr<SearchEngineTabHelper> search_engine_tab_helper_; |
| 342 scoped_ptr<chrome::search::SearchTabHelper> search_tab_helper_; | 330 scoped_ptr<chrome::search::SearchTabHelper> search_tab_helper_; |
| 343 scoped_ptr<browser_sync::SyncedTabDelegate> synced_tab_delegate_; | 331 scoped_ptr<browser_sync::SyncedTabDelegate> synced_tab_delegate_; |
| 344 | 332 |
| 345 // The TabSpecificContentSettings object is used to query the blocked content | 333 // The TabSpecificContentSettings object is used to query the blocked content |
| 346 // state by various UI elements. | 334 // state by various UI elements. |
| 347 scoped_ptr<TabSpecificContentSettings> content_settings_; | 335 scoped_ptr<TabSpecificContentSettings> content_settings_; |
| 348 | 336 |
| 349 scoped_ptr<ThumbnailGenerator> thumbnail_generator_; | 337 scoped_ptr<ThumbnailGenerator> thumbnail_generator_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 360 | 348 |
| 361 scoped_ptr<extensions::WebNavigationTabObserver> webnavigation_observer_; | 349 scoped_ptr<extensions::WebNavigationTabObserver> webnavigation_observer_; |
| 362 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_; | 350 scoped_ptr<ExternalProtocolObserver> external_protocol_observer_; |
| 363 scoped_ptr<NavigationMetricsRecorder> navigation_metrics_recorder_; | 351 scoped_ptr<NavigationMetricsRecorder> navigation_metrics_recorder_; |
| 364 scoped_ptr<OmniboxSearchHint> omnibox_search_hint_; | 352 scoped_ptr<OmniboxSearchHint> omnibox_search_hint_; |
| 365 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 353 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 366 scoped_ptr<OneClickSigninHelper> one_click_signin_helper_; | 354 scoped_ptr<OneClickSigninHelper> one_click_signin_helper_; |
| 367 #endif | 355 #endif |
| 368 scoped_ptr<PepperBrokerObserver> pepper_broker_observer_; | 356 scoped_ptr<PepperBrokerObserver> pepper_broker_observer_; |
| 369 scoped_ptr<PluginObserver> plugin_observer_; | 357 scoped_ptr<PluginObserver> plugin_observer_; |
| 370 scoped_ptr<printing::PrintPreviewMessageHandler> print_preview_; | |
| 371 scoped_ptr<safe_browsing::SafeBrowsingTabObserver> | 358 scoped_ptr<safe_browsing::SafeBrowsingTabObserver> |
| 372 safe_browsing_tab_observer_; | 359 safe_browsing_tab_observer_; |
| 373 | 360 |
| 374 // WebContents (MUST BE LAST) ------------------------------------------------ | 361 // WebContents (MUST BE LAST) ------------------------------------------------ |
| 375 | 362 |
| 376 // If true, we're running the destructor. | 363 // If true, we're running the destructor. |
| 377 bool in_destructor_; | 364 bool in_destructor_; |
| 378 | 365 |
| 379 // The supporting objects need to outlive the WebContents dtor (as they may | 366 // The supporting objects need to outlive the WebContents dtor (as they may |
| 380 // be called upon during its execution). As a result, this must come last | 367 // be called upon during its execution). As a result, this must come last |
| 381 // in the list. | 368 // in the list. |
| 382 scoped_ptr<content::WebContents> web_contents_; | 369 scoped_ptr<content::WebContents> web_contents_; |
| 383 | 370 |
| 384 DISALLOW_COPY_AND_ASSIGN(TabContents); | 371 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 385 }; | 372 }; |
| 386 | 373 |
| 387 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ | 374 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |