| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 translate_tab_helper_.reset(new TranslateTabHelper(contents)); | 298 translate_tab_helper_.reset(new TranslateTabHelper(contents)); |
| 299 web_intent_picker_controller_.reset(new WebIntentPickerController( | 299 web_intent_picker_controller_.reset(new WebIntentPickerController( |
| 300 this, new WebIntentPickerFactoryImpl())); | 300 this, new WebIntentPickerFactoryImpl())); |
| 301 | 301 |
| 302 // Create the per-tab observers. | 302 // Create the per-tab observers. |
| 303 download_request_limiter_observer_.reset( | 303 download_request_limiter_observer_.reset( |
| 304 new DownloadRequestLimiterObserver(contents)); | 304 new DownloadRequestLimiterObserver(contents)); |
| 305 webnavigation_observer_.reset( | 305 webnavigation_observer_.reset( |
| 306 new ExtensionWebNavigationTabObserver(contents)); | 306 new ExtensionWebNavigationTabObserver(contents)); |
| 307 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); | 307 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); |
| 308 per_tab_prefs_.reset( |
| 309 profile()->GetPrefs()->CreatePrefServiceWithPerTabPrefStore()); |
| 308 plugin_observer_.reset(new PluginObserver(this)); | 310 plugin_observer_.reset(new PluginObserver(this)); |
| 309 print_preview_.reset(new printing::PrintPreviewMessageHandler(contents)); | 311 print_preview_.reset(new printing::PrintPreviewMessageHandler(contents)); |
| 310 sad_tab_observer_.reset(new SadTabObserver(contents)); | 312 sad_tab_observer_.reset(new SadTabObserver(contents)); |
| 311 // Start the in-browser thumbnailing if the feature is enabled. | 313 // Start the in-browser thumbnailing if the feature is enabled. |
| 312 if (switches::IsInBrowserThumbnailingEnabled()) { | 314 if (switches::IsInBrowserThumbnailingEnabled()) { |
| 313 thumbnail_generation_observer_.reset(new ThumbnailGenerator); | 315 thumbnail_generation_observer_.reset(new ThumbnailGenerator); |
| 314 thumbnail_generation_observer_->StartThumbnailing(tab_contents_.get()); | 316 thumbnail_generation_observer_->StartThumbnailing(tab_contents_.get()); |
| 315 } | 317 } |
| 316 | 318 |
| 317 // Set-up the showing of the omnibox search infobar if applicable. | 319 // Set-up the showing of the omnibox search infobar if applicable. |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 render_view_host()->Send( | 715 render_view_host()->Send( |
| 714 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), | 716 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), |
| 715 safe_browsing)); | 717 safe_browsing)); |
| 716 #endif | 718 #endif |
| 717 } | 719 } |
| 718 | 720 |
| 719 void TabContentsWrapper::ExitFullscreenMode() { | 721 void TabContentsWrapper::ExitFullscreenMode() { |
| 720 if (tab_contents() && render_view_host()) | 722 if (tab_contents() && render_view_host()) |
| 721 tab_contents()->render_view_host()->ExitFullscreen(); | 723 tab_contents()->render_view_host()->ExitFullscreen(); |
| 722 } | 724 } |
| OLD | NEW |