Index: chrome/browser/ui/tab_contents/core_tab_helper.cc |
=================================================================== |
--- chrome/browser/ui/tab_contents/core_tab_helper.cc (revision 113821) |
+++ chrome/browser/ui/tab_contents/core_tab_helper.cc (working copy) |
@@ -4,14 +4,9 @@ |
#include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
-#include "chrome/browser/prefs/pref_service.h" |
-#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/renderer_host/web_cache_manager.h" |
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
-#include "chrome/common/chrome_notification_types.h" |
-#include "chrome/common/pref_names.h" |
#include "content/browser/renderer_host/render_view_host.h" |
-#include "content/public/browser/notification_service.h" |
#include "grit/generated_resources.h" |
#include "ui/base/l10n/l10n_util.h" |
@@ -19,11 +14,6 @@ |
: TabContentsObserver(wrapper->tab_contents()), |
delegate_(NULL), |
wrapper_(wrapper) { |
- PrefService* prefs = wrapper_->profile()->GetPrefs(); |
- if (prefs) { |
- pref_change_registrar_.Init(prefs); |
- pref_change_registrar_.Add(prefs::kDefaultZoomLevel, this); |
- } |
} |
CoreTabHelper::~CoreTabHelper() { |
@@ -88,27 +78,3 @@ |
WebCacheManager::GetInstance()->ObserveActivity( |
tab_contents()->GetRenderProcessHost()->GetID()); |
} |
- |
-//////////////////////////////////////////////////////////////////////////////// |
-// content::NotificationObserver overrides |
- |
-void CoreTabHelper::Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) { |
- switch (type) { |
- case chrome::NOTIFICATION_PREF_CHANGED: { |
- std::string* pref_name = content::Details<std::string>(details).ptr(); |
- DCHECK(content::Source<PrefService>(source).ptr() == |
- wrapper_->profile()->GetPrefs()); |
- if (*pref_name == prefs::kDefaultZoomLevel) { |
- tab_contents()->render_view_host()->SetZoomLevel( |
- tab_contents()->GetZoomLevel()); |
- } else { |
- NOTREACHED() << "unexpected pref change notification" << *pref_name; |
- } |
- break; |
- } |
- default: |
- NOTREACHED(); |
- } |
-} |