| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 5 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/infobars/infobar_tab_helper.h" | 23 #include "chrome/browser/infobars/infobar_tab_helper.h" |
| 24 #include "chrome/browser/omnibox_search_hint.h" | 24 #include "chrome/browser/omnibox_search_hint.h" |
| 25 #include "chrome/browser/password_manager/password_manager.h" | 25 #include "chrome/browser/password_manager/password_manager.h" |
| 26 #include "chrome/browser/password_manager_delegate_impl.h" | 26 #include "chrome/browser/password_manager_delegate_impl.h" |
| 27 #include "chrome/browser/pdf_unsupported_feature.h" | 27 #include "chrome/browser/pdf_unsupported_feature.h" |
| 28 #include "chrome/browser/plugin_observer.h" | 28 #include "chrome/browser/plugin_observer.h" |
| 29 #include "chrome/browser/prefs/pref_service.h" | 29 #include "chrome/browser/prefs/pref_service.h" |
| 30 #include "chrome/browser/prerender/prerender_tab_helper.h" | 30 #include "chrome/browser/prerender/prerender_tab_helper.h" |
| 31 #include "chrome/browser/printing/print_preview_message_handler.h" | 31 #include "chrome/browser/printing/print_preview_message_handler.h" |
| 32 #include "chrome/browser/printing/print_view_manager.h" | 32 #include "chrome/browser/printing/print_view_manager.h" |
| 33 #include "chrome/browser/remoting/firewall_traversal_observer.h" | |
| 34 #include "chrome/browser/renderer_host/web_cache_manager.h" | 33 #include "chrome/browser/renderer_host/web_cache_manager.h" |
| 35 #include "chrome/browser/renderer_preferences_util.h" | 34 #include "chrome/browser/renderer_preferences_util.h" |
| 36 #include "chrome/browser/sessions/restore_tab_helper.h" | 35 #include "chrome/browser/sessions/restore_tab_helper.h" |
| 37 #include "chrome/browser/safe_browsing/client_side_detection_host.h" | 36 #include "chrome/browser/safe_browsing/client_side_detection_host.h" |
| 38 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" | 37 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" |
| 39 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 38 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
| 40 #include "chrome/browser/themes/theme_service.h" | 39 #include "chrome/browser/themes/theme_service.h" |
| 41 #include "chrome/browser/themes/theme_service_factory.h" | 40 #include "chrome/browser/themes/theme_service_factory.h" |
| 42 #include "chrome/browser/translate/translate_tab_helper.h" | 41 #include "chrome/browser/translate/translate_tab_helper.h" |
| 43 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" | 42 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 translate_tab_helper_.reset(new TranslateTabHelper(contents)); | 274 translate_tab_helper_.reset(new TranslateTabHelper(contents)); |
| 276 web_intent_picker_controller_.reset(new WebIntentPickerController( | 275 web_intent_picker_controller_.reset(new WebIntentPickerController( |
| 277 this, new WebIntentPickerFactoryImpl())); | 276 this, new WebIntentPickerFactoryImpl())); |
| 278 | 277 |
| 279 // Create the per-tab observers. | 278 // Create the per-tab observers. |
| 280 download_request_limiter_observer_.reset( | 279 download_request_limiter_observer_.reset( |
| 281 new DownloadRequestLimiterObserver(contents)); | 280 new DownloadRequestLimiterObserver(contents)); |
| 282 webnavigation_observer_.reset( | 281 webnavigation_observer_.reset( |
| 283 new ExtensionWebNavigationTabObserver(contents)); | 282 new ExtensionWebNavigationTabObserver(contents)); |
| 284 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); | 283 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); |
| 285 firewall_traversal_observer_.reset(new FirewallTraversalObserver(contents)); | |
| 286 plugin_observer_.reset(new PluginObserver(this)); | 284 plugin_observer_.reset(new PluginObserver(this)); |
| 287 print_preview_.reset(new printing::PrintPreviewMessageHandler(contents)); | 285 print_preview_.reset(new printing::PrintPreviewMessageHandler(contents)); |
| 288 // Start the in-browser thumbnailing if the feature is enabled. | 286 // Start the in-browser thumbnailing if the feature is enabled. |
| 289 if (switches::IsInBrowserThumbnailingEnabled()) { | 287 if (switches::IsInBrowserThumbnailingEnabled()) { |
| 290 thumbnail_generation_observer_.reset(new ThumbnailGenerator); | 288 thumbnail_generation_observer_.reset(new ThumbnailGenerator); |
| 291 thumbnail_generation_observer_->StartThumbnailing(tab_contents_.get()); | 289 thumbnail_generation_observer_->StartThumbnailing(tab_contents_.get()); |
| 292 } | 290 } |
| 293 | 291 |
| 294 // Set-up the showing of the omnibox search infobar if applicable. | 292 // Set-up the showing of the omnibox search infobar if applicable. |
| 295 if (OmniboxSearchHint::IsEnabled(profile())) | 293 if (OmniboxSearchHint::IsEnabled(profile())) |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 render_view_host()->Send( | 670 render_view_host()->Send( |
| 673 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), | 671 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), |
| 674 safe_browsing)); | 672 safe_browsing)); |
| 675 #endif | 673 #endif |
| 676 } | 674 } |
| 677 | 675 |
| 678 void TabContentsWrapper::ExitFullscreenMode() { | 676 void TabContentsWrapper::ExitFullscreenMode() { |
| 679 if (tab_contents() && render_view_host()) | 677 if (tab_contents() && render_view_host()) |
| 680 tab_contents()->render_view_host()->ExitFullscreen(); | 678 tab_contents()->render_view_host()->ExitFullscreen(); |
| 681 } | 679 } |
| OLD | NEW |