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 #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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "chrome/browser/autocomplete_history_manager.h" | 9 #include "chrome/browser/autocomplete_history_manager.h" |
10 #include "chrome/browser/autofill/autofill_external_delegate.h" | 10 #include "chrome/browser/autofill/autofill_external_delegate.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); | 110 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); |
111 #endif | 111 #endif |
112 | 112 |
113 #if !defined(OS_ANDROID) | 113 #if !defined(OS_ANDROID) |
114 print_view_manager_.reset(new printing::PrintViewManager(this)); | 114 print_view_manager_.reset(new printing::PrintViewManager(this)); |
115 sad_tab_helper_.reset(new SadTabHelper(contents)); | 115 sad_tab_helper_.reset(new SadTabHelper(contents)); |
116 #endif | 116 #endif |
117 | 117 |
118 // Create the per-tab observers. | 118 // Create the per-tab observers. |
119 alternate_error_page_tab_observer_.reset( | 119 alternate_error_page_tab_observer_.reset( |
120 new AlternateErrorPageTabObserver(contents)); | 120 new AlternateErrorPageTabObserver(contents, profile())); |
121 download_request_limiter_observer_.reset( | 121 download_request_limiter_observer_.reset( |
122 new DownloadRequestLimiterObserver(contents)); | 122 new DownloadRequestLimiterObserver(contents)); |
123 webnavigation_observer_.reset( | 123 webnavigation_observer_.reset( |
124 new extensions::WebNavigationTabObserver(contents)); | 124 new extensions::WebNavigationTabObserver(contents)); |
125 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); | 125 external_protocol_observer_.reset(new ExternalProtocolObserver(contents)); |
126 if (OmniboxSearchHint::IsEnabled(profile())) | 126 if (OmniboxSearchHint::IsEnabled(profile())) |
127 omnibox_search_hint_.reset(new OmniboxSearchHint(this)); | 127 omnibox_search_hint_.reset(new OmniboxSearchHint(this)); |
128 pdf_tab_observer_.reset(new PDFTabObserver(this)); | 128 pdf_tab_observer_.reset(new PDFTabObserver(this)); |
129 plugin_observer_.reset(new PluginObserver(this)); | 129 plugin_observer_.reset(new PluginObserver(this)); |
130 safe_browsing_tab_observer_.reset( | 130 safe_browsing_tab_observer_.reset( |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 //////////////////////////////////////////////////////////////////////////////// | 205 //////////////////////////////////////////////////////////////////////////////// |
206 // WebContentsObserver overrides | 206 // WebContentsObserver overrides |
207 | 207 |
208 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) { | 208 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) { |
209 // Destruction of the WebContents should only be done by us from our | 209 // Destruction of the WebContents should only be done by us from our |
210 // destructor. Otherwise it's very likely we (or one of the helpers we own) | 210 // destructor. Otherwise it's very likely we (or one of the helpers we own) |
211 // will attempt to access the TabContents and we'll crash. | 211 // will attempt to access the TabContents and we'll crash. |
212 DCHECK(in_destructor_); | 212 DCHECK(in_destructor_); |
213 } | 213 } |
OLD | NEW |