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

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

Issue 10444040: Tracks changes to zoom icon and zoom percentage. Notifies browser window if the icon should be chan… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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
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_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/hung_plugin_tab_helper.h" 38 #include "chrome/browser/ui/hung_plugin_tab_helper.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_helper.h" 42 #include "chrome/browser/ui/sad_tab_helper.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/one_click_signin_helper.h" 45 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
46 #include "chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.h" 46 #include "chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.h"
47 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 47 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
48 #include "chrome/browser/ui/zoom/zoom_tab_helper.h"
48 #include "chrome/browser/view_type_utils.h" 49 #include "chrome/browser/view_type_utils.h"
49 #include "chrome/common/chrome_switches.h" 50 #include "chrome/common/chrome_switches.h"
50 #include "content/public/browser/web_contents.h" 51 #include "content/public/browser/web_contents.h"
51 52
52 using content::WebContents; 53 using content::WebContents;
53 54
54 namespace { 55 namespace {
55 56
56 static base::LazyInstance<base::PropertyAccessor<TabContentsWrapper*> > 57 static base::LazyInstance<base::PropertyAccessor<TabContentsWrapper*> >
57 g_tab_contents_wrapper_property_accessor = LAZY_INSTANCE_INITIALIZER; 58 g_tab_contents_wrapper_property_accessor = LAZY_INSTANCE_INITIALIZER;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 prefs_tab_helper_.reset(new PrefsTabHelper(contents)); 105 prefs_tab_helper_.reset(new PrefsTabHelper(contents));
105 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this)); 106 prerender_tab_helper_.reset(new prerender::PrerenderTabHelper(this));
106 restore_tab_helper_.reset(new RestoreTabHelper(contents)); 107 restore_tab_helper_.reset(new RestoreTabHelper(contents));
107 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents)); 108 search_engine_tab_helper_.reset(new SearchEngineTabHelper(contents));
108 snapshot_tab_helper_.reset(new SnapshotTabHelper(contents)); 109 snapshot_tab_helper_.reset(new SnapshotTabHelper(contents));
109 ssl_helper_.reset(new TabContentsSSLHelper(this)); 110 ssl_helper_.reset(new TabContentsSSLHelper(this));
110 synced_tab_delegate_.reset(new TabContentsWrapperSyncedTabDelegate(this)); 111 synced_tab_delegate_.reset(new TabContentsWrapperSyncedTabDelegate(this));
111 content_settings_.reset(new TabSpecificContentSettings(contents)); 112 content_settings_.reset(new TabSpecificContentSettings(contents));
112 translate_tab_helper_.reset(new TranslateTabHelper(contents)); 113 translate_tab_helper_.reset(new TranslateTabHelper(contents));
113 web_intent_picker_controller_.reset(new WebIntentPickerController(this)); 114 web_intent_picker_controller_.reset(new WebIntentPickerController(this));
115 zoom_tab_helper_.reset(new ZoomTabHelper(this));
114 116
115 #if !defined(OS_ANDROID) 117 #if !defined(OS_ANDROID)
116 print_view_manager_.reset(new printing::PrintViewManager(this)); 118 print_view_manager_.reset(new printing::PrintViewManager(this));
117 sad_tab_helper_.reset(new SadTabHelper(contents)); 119 sad_tab_helper_.reset(new SadTabHelper(contents));
118 #endif 120 #endif
119 121
120 // Create the per-tab observers. 122 // Create the per-tab observers.
121 alternate_error_page_tab_observer_.reset( 123 alternate_error_page_tab_observer_.reset(
122 new AlternateErrorPageTabObserver(contents, profile())); 124 new AlternateErrorPageTabObserver(contents, profile()));
123 download_request_limiter_observer_.reset( 125 download_request_limiter_observer_.reset(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 208
207 //////////////////////////////////////////////////////////////////////////////// 209 ////////////////////////////////////////////////////////////////////////////////
208 // WebContentsObserver overrides 210 // WebContentsObserver overrides
209 211
210 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) { 212 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) {
211 // Destruction of the WebContents should only be done by us from our 213 // Destruction of the WebContents should only be done by us from our
212 // destructor. Otherwise it's very likely we (or one of the helpers we own) 214 // destructor. Otherwise it's very likely we (or one of the helpers we own)
213 // will attempt to access the WebContents and we'll crash. 215 // will attempt to access the WebContents and we'll crash.
214 DCHECK(in_destructor_); 216 DCHECK(in_destructor_);
215 } 217 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698