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" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "chrome/browser/autocomplete_history_manager.h" | 12 #include "chrome/browser/autocomplete_history_manager.h" |
13 #include "chrome/browser/autofill/autofill_external_delegate.h" | 13 #include "chrome/browser/autofill/autofill_external_delegate.h" |
14 #include "chrome/browser/autofill/autofill_manager.h" | 14 #include "chrome/browser/autofill/autofill_manager.h" |
15 #include "chrome/browser/automation/automation_tab_helper.h" | 15 #include "chrome/browser/automation/automation_tab_helper.h" |
16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
| 17 #if defined(ENABLE_INPUT_COLOR) |
| 18 #include "chrome/browser/color_select_helper.h" |
| 19 #endif |
17 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 20 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
18 #include "chrome/browser/download/download_request_limiter_observer.h" | 21 #include "chrome/browser/download/download_request_limiter_observer.h" |
19 #include "chrome/browser/extensions/extension_tab_helper.h" | 22 #include "chrome/browser/extensions/extension_tab_helper.h" |
20 #include "chrome/browser/extensions/extension_webnavigation_api.h" | 23 #include "chrome/browser/extensions/extension_webnavigation_api.h" |
21 #include "chrome/browser/external_protocol/external_protocol_observer.h" | 24 #include "chrome/browser/external_protocol/external_protocol_observer.h" |
22 #include "chrome/browser/favicon/favicon_tab_helper.h" | 25 #include "chrome/browser/favicon/favicon_tab_helper.h" |
23 #include "chrome/browser/google/google_util.h" | 26 #include "chrome/browser/google/google_util.h" |
24 #include "chrome/browser/history/history_tab_helper.h" | 27 #include "chrome/browser/history/history_tab_helper.h" |
25 #include "chrome/browser/infobars/infobar_tab_helper.h" | 28 #include "chrome/browser/infobars/infobar_tab_helper.h" |
26 #include "chrome/browser/omnibox_search_hint.h" | 29 #include "chrome/browser/omnibox_search_hint.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 } | 282 } |
280 #endif | 283 #endif |
281 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); | 284 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); |
282 ssl_helper_.reset(new TabContentsSSLHelper(this)); | 285 ssl_helper_.reset(new TabContentsSSLHelper(this)); |
283 content_settings_.reset(new TabSpecificContentSettings(contents)); | 286 content_settings_.reset(new TabSpecificContentSettings(contents)); |
284 translate_tab_helper_.reset(new TranslateTabHelper(contents)); | 287 translate_tab_helper_.reset(new TranslateTabHelper(contents)); |
285 web_intent_picker_controller_.reset(new WebIntentPickerController( | 288 web_intent_picker_controller_.reset(new WebIntentPickerController( |
286 this, new WebIntentPickerFactoryImpl())); | 289 this, new WebIntentPickerFactoryImpl())); |
287 | 290 |
288 // Create the per-tab observers. | 291 // Create the per-tab observers. |
| 292 #if defined(ENABLE_INPUT_COLOR) |
| 293 color_select_observer_.reset(new ColorSelectObserver(contents)); |
| 294 #endif // defined(ENABLE_INPUT_COLOR) |
289 download_request_limiter_observer_.reset( | 295 download_request_limiter_observer_.reset( |
290 new DownloadRequestLimiterObserver(contents)); | 296 new DownloadRequestLimiterObserver(contents)); |
291 webnavigation_observer_.reset( | 297 webnavigation_observer_.reset( |
292 new ExtensionWebNavigationTabObserver(contents)); | 298 new ExtensionWebNavigationTabObserver(contents)); |
293 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); | 299 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); |
294 plugin_observer_.reset(new PluginObserver(this)); | 300 plugin_observer_.reset(new PluginObserver(this)); |
295 print_preview_.reset(new printing::PrintPreviewMessageHandler(contents)); | 301 print_preview_.reset(new printing::PrintPreviewMessageHandler(contents)); |
296 // Start the in-browser thumbnailing if the feature is enabled. | 302 // Start the in-browser thumbnailing if the feature is enabled. |
297 if (switches::IsInBrowserThumbnailingEnabled()) { | 303 if (switches::IsInBrowserThumbnailingEnabled()) { |
298 thumbnail_generation_observer_.reset(new ThumbnailGenerator); | 304 thumbnail_generation_observer_.reset(new ThumbnailGenerator); |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 render_view_host()->Send( | 688 render_view_host()->Send( |
683 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), | 689 new ChromeViewMsg_SetClientSidePhishingDetection(routing_id(), |
684 safe_browsing)); | 690 safe_browsing)); |
685 #endif | 691 #endif |
686 } | 692 } |
687 | 693 |
688 void TabContentsWrapper::ExitFullscreenMode() { | 694 void TabContentsWrapper::ExitFullscreenMode() { |
689 if (tab_contents() && render_view_host()) | 695 if (tab_contents() && render_view_host()) |
690 tab_contents()->render_view_host()->ExitFullscreen(); | 696 tab_contents()->render_view_host()->ExitFullscreen(); |
691 } | 697 } |
OLD | NEW |