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

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

Issue 10959054: Switch ZoomTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 months 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) 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.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents.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/autofill/autocomplete_history_manager.h" 9 #include "chrome/browser/autofill/autocomplete_history_manager.h"
10 #include "chrome/browser/autofill/autofill_external_delegate.h" 10 #include "chrome/browser/autofill/autofill_external_delegate.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 password_manager_.reset( 143 password_manager_.reset(
144 new PasswordManager(contents, password_manager_delegate_.get())); 144 new PasswordManager(contents, password_manager_delegate_.get()));
145 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); 145 prefs_tab_helper_.reset(new PrefsTabHelper(contents));
146 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); 146 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this));
147 SearchEngineTabHelper::CreateForWebContents(contents); 147 SearchEngineTabHelper::CreateForWebContents(contents);
148 chrome::search::SearchTabHelper::CreateForWebContents(contents); 148 chrome::search::SearchTabHelper::CreateForWebContents(contents);
149 SnapshotTabHelper::CreateForWebContents(contents); 149 SnapshotTabHelper::CreateForWebContents(contents);
150 SSLTabHelper::CreateForWebContents(contents); 150 SSLTabHelper::CreateForWebContents(contents);
151 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this)); 151 synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this));
152 translate_tab_helper_.reset(new TranslateTabHelper(contents)); 152 translate_tab_helper_.reset(new TranslateTabHelper(contents));
153 zoom_controller_.reset(new ZoomController(this)); 153 ZoomController::CreateForWebContents(contents);
154 154
155 #if defined(ENABLE_AUTOMATION) 155 #if defined(ENABLE_AUTOMATION)
156 automation_tab_helper_.reset(new AutomationTabHelper(contents)); 156 automation_tab_helper_.reset(new AutomationTabHelper(contents));
157 #endif 157 #endif
158 158
159 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 159 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
160 captive_portal::CaptivePortalTabHelper::CreateForWebContents(contents); 160 captive_portal::CaptivePortalTabHelper::CreateForWebContents(contents);
161 #endif 161 #endif
162 162
163 #if !defined(OS_ANDROID) 163 #if !defined(OS_ANDROID)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 //////////////////////////////////////////////////////////////////////////////// 242 ////////////////////////////////////////////////////////////////////////////////
243 // WebContentsObserver overrides 243 // WebContentsObserver overrides
244 244
245 void TabContents::WebContentsDestroyed(WebContents* tab) { 245 void TabContents::WebContentsDestroyed(WebContents* tab) {
246 // Destruction of the WebContents should only be done by us from our 246 // Destruction of the WebContents should only be done by us from our
247 // destructor. Otherwise it's very likely we (or one of the helpers we own) 247 // destructor. Otherwise it's very likely we (or one of the helpers we own)
248 // will attempt to access the WebContents and we'll crash. 248 // will attempt to access the WebContents and we'll crash.
249 DCHECK(in_destructor_); 249 DCHECK(in_destructor_);
250 } 250 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.h ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698