| 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/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 27 matching lines...) Expand all Loading... |
| 38 #include "chrome/browser/ui/intents/web_intent_picker_factory_impl.h" | 38 #include "chrome/browser/ui/intents/web_intent_picker_factory_impl.h" |
| 39 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" | 39 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
| 40 #include "chrome/browser/ui/pdf/pdf_tab_observer.h" | 40 #include "chrome/browser/ui/pdf/pdf_tab_observer.h" |
| 41 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 41 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
| 42 #include "chrome/browser/ui/sad_tab_observer.h" | 42 #include "chrome/browser/ui/sad_tab_observer.h" |
| 43 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 43 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
| 44 #include "chrome/browser/ui/snapshot_tab_helper.h" | 44 #include "chrome/browser/ui/snapshot_tab_helper.h" |
| 45 #include "chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.h" | 45 #include "chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.h" |
| 46 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 46 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| 47 #include "chrome/common/chrome_switches.h" | 47 #include "chrome/common/chrome_switches.h" |
| 48 #include "content/browser/tab_contents/tab_contents.h" |
| 48 | 49 |
| 49 namespace { | 50 namespace { |
| 50 | 51 |
| 51 static base::LazyInstance<base::PropertyAccessor<TabContentsWrapper*> > | 52 static base::LazyInstance<base::PropertyAccessor<TabContentsWrapper*> > |
| 52 g_tab_contents_wrapper_property_accessor = LAZY_INSTANCE_INITIALIZER; | 53 g_tab_contents_wrapper_property_accessor = LAZY_INSTANCE_INITIALIZER; |
| 53 | 54 |
| 54 } // namespace | 55 } // namespace |
| 55 | 56 |
| 56 //////////////////////////////////////////////////////////////////////////////// | 57 //////////////////////////////////////////////////////////////////////////////// |
| 57 // TabContentsWrapper, public: | 58 // TabContentsWrapper, public: |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 177 |
| 177 //////////////////////////////////////////////////////////////////////////////// | 178 //////////////////////////////////////////////////////////////////////////////// |
| 178 // TabContentsObserver overrides | 179 // TabContentsObserver overrides |
| 179 | 180 |
| 180 void TabContentsWrapper::TabContentsDestroyed(TabContents* tab) { | 181 void TabContentsWrapper::TabContentsDestroyed(TabContents* tab) { |
| 181 // Destruction of the TabContents should only be done by us from our | 182 // Destruction of the TabContents should only be done by us from our |
| 182 // destructor. Otherwise it's very likely we (or one of the helpers we own) | 183 // destructor. Otherwise it's very likely we (or one of the helpers we own) |
| 183 // will attempt to access the TabContents and we'll crash. | 184 // will attempt to access the TabContents and we'll crash. |
| 184 DCHECK(in_destructor_); | 185 DCHECK(in_destructor_); |
| 185 } | 186 } |
| OLD | NEW |