Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents_wrapper.h ('k') | chrome/browser/ui/views/collected_cookies_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698