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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h" | 44 #include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h" |
45 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" | 45 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" |
46 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" | 46 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" |
47 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 47 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
48 #include "chrome/browser/themes/theme_service.h" | 48 #include "chrome/browser/themes/theme_service.h" |
49 #include "chrome/browser/themes/theme_service_factory.h" | 49 #include "chrome/browser/themes/theme_service_factory.h" |
50 #include "chrome/browser/translate/translate_tab_helper.h" | 50 #include "chrome/browser/translate/translate_tab_helper.h" |
51 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" | 51 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
52 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 52 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
53 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 53 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
54 #include "chrome/browser/ui/intents/web_intent_constrained_dialog_factory.h" | |
55 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" | |
56 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 54 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
57 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" | 55 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" |
58 #include "chrome/common/chrome_notification_types.h" | 56 #include "chrome/common/chrome_notification_types.h" |
59 #include "chrome/common/chrome_switches.h" | 57 #include "chrome/common/chrome_switches.h" |
60 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
61 #include "chrome/common/render_messages.h" | 59 #include "chrome/common/render_messages.h" |
62 #include "content/browser/child_process_security_policy.h" | 60 #include "content/browser/child_process_security_policy.h" |
63 #include "content/browser/renderer_host/render_view_host.h" | 61 #include "content/browser/renderer_host/render_view_host.h" |
64 #include "content/browser/tab_contents/navigation_details.h" | 62 #include "content/browser/tab_contents/navigation_details.h" |
65 #include "content/browser/tab_contents/tab_contents.h" | 63 #include "content/browser/tab_contents/tab_contents.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 g_browser_process->safe_browsing_detection_service()) { | 158 g_browser_process->safe_browsing_detection_service()) { |
161 safebrowsing_detection_host_.reset( | 159 safebrowsing_detection_host_.reset( |
162 safe_browsing::ClientSideDetectionHost::Create(contents)); | 160 safe_browsing::ClientSideDetectionHost::Create(contents)); |
163 } | 161 } |
164 #endif | 162 #endif |
165 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); | 163 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); |
166 ssl_helper_.reset(new TabContentsSSLHelper(this)); | 164 ssl_helper_.reset(new TabContentsSSLHelper(this)); |
167 content_settings_.reset(new TabSpecificContentSettings(contents)); | 165 content_settings_.reset(new TabSpecificContentSettings(contents)); |
168 translate_tab_helper_.reset(new TranslateTabHelper(contents)); | 166 translate_tab_helper_.reset(new TranslateTabHelper(contents)); |
169 print_view_manager_.reset(new printing::PrintViewManager(this)); | 167 print_view_manager_.reset(new printing::PrintViewManager(this)); |
170 web_intent_picker_controller_.reset(new WebIntentPickerController( | |
171 contents, | |
172 new WebIntentConstrainedDialogFactory())); | |
173 | 168 |
174 // Create the per-tab observers. | 169 // Create the per-tab observers. |
175 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); | 170 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); |
176 download_request_limiter_observer_.reset( | 171 download_request_limiter_observer_.reset( |
177 new DownloadRequestLimiterObserver(contents)); | 172 new DownloadRequestLimiterObserver(contents)); |
178 plugin_observer_.reset(new PluginObserver(this)); | 173 plugin_observer_.reset(new PluginObserver(this)); |
179 prerender_observer_.reset(new prerender::PrerenderObserver(this)); | 174 prerender_observer_.reset(new prerender::PrerenderObserver(this)); |
180 print_preview_.reset(new printing::PrintPreviewMessageHandler(contents)); | 175 print_preview_.reset(new printing::PrintPreviewMessageHandler(contents)); |
181 webnavigation_observer_.reset( | 176 webnavigation_observer_.reset( |
182 new ExtensionWebNavigationTabObserver(contents)); | 177 new ExtensionWebNavigationTabObserver(contents)); |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 } | 754 } |
760 | 755 |
761 void TabContentsWrapper::RemoveAllInfoBars(bool animate) { | 756 void TabContentsWrapper::RemoveAllInfoBars(bool animate) { |
762 while (!infobars_.empty()) | 757 while (!infobars_.empty()) |
763 RemoveInfoBarInternal(GetInfoBarDelegateAt(infobar_count() - 1), animate); | 758 RemoveInfoBarInternal(GetInfoBarDelegateAt(infobar_count() - 1), animate); |
764 } | 759 } |
765 | 760 |
766 void TabContentsWrapper::ExitFullscreenMode() { | 761 void TabContentsWrapper::ExitFullscreenMode() { |
767 Send(new ViewMsg_ExitFullscreen(routing_id())); | 762 Send(new ViewMsg_ExitFullscreen(routing_id())); |
768 } | 763 } |
OLD | NEW |