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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 new PasswordManager(contents, password_manager_delegate_.get())); | 109 new PasswordManager(contents, password_manager_delegate_.get())); |
110 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); | 110 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); |
111 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); | 111 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); |
112 restore_tab_helper_.reset(new RestoreTabHelper(contents)); | 112 restore_tab_helper_.reset(new RestoreTabHelper(contents)); |
113 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); | 113 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); |
114 snapshot_tab_helper_.reset(new SnapshotTabHelper(contents)); | 114 snapshot_tab_helper_.reset(new SnapshotTabHelper(contents)); |
115 ssl_helper_.reset(new TabContentsSSLHelper(this)); | 115 ssl_helper_.reset(new TabContentsSSLHelper(this)); |
116 synced_tab_delegate_.reset(new TabContentsWrapperSyncedTabDelegate(this)); | 116 synced_tab_delegate_.reset(new TabContentsWrapperSyncedTabDelegate(this)); |
117 content_settings_.reset(new TabSpecificContentSettings(contents)); | 117 content_settings_.reset(new TabSpecificContentSettings(contents)); |
118 translate_tab_helper_.reset(new TranslateTabHelper(contents)); | 118 translate_tab_helper_.reset(new TranslateTabHelper(contents)); |
119 | |
120 #if defined(ENABLE_WEB_INTENTS) | |
121 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); | 119 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); |
122 #endif | |
123 | 120 |
124 #if !defined(OS_ANDROID) | 121 #if !defined(OS_ANDROID) |
125 print_view_manager_.reset(new printing::PrintViewManager(this)); | 122 print_view_manager_.reset(new printing::PrintViewManager(this)); |
126 sad_tab_helper_.reset(new SadTabHelper(contents)); | 123 sad_tab_helper_.reset(new SadTabHelper(contents)); |
127 #endif | 124 #endif |
128 | 125 |
129 // Create the per-tab observers. | 126 // Create the per-tab observers. |
130 alternate_error_page_tab_observer_.reset( | 127 alternate_error_page_tab_observer_.reset( |
131 new AlternateErrorPageTabObserver(contents, profile())); | 128 new AlternateErrorPageTabObserver(contents, profile())); |
132 download_request_limiter_observer_.reset( | 129 download_request_limiter_observer_.reset( |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 212 |
216 //////////////////////////////////////////////////////////////////////////////// | 213 //////////////////////////////////////////////////////////////////////////////// |
217 // WebContentsObserver overrides | 214 // WebContentsObserver overrides |
218 | 215 |
219 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) { | 216 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) { |
220 // Destruction of the WebContents should only be done by us from our | 217 // Destruction of the WebContents should only be done by us from our |
221 // destructor. Otherwise it's very likely we (or one of the helpers we own) | 218 // destructor. Otherwise it's very likely we (or one of the helpers we own) |
222 // will attempt to access the WebContents and we'll crash. | 219 // will attempt to access the WebContents and we'll crash. |
223 DCHECK(in_destructor_); | 220 DCHECK(in_destructor_); |
224 } | 221 } |
OLD | NEW |