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

Unified Diff: chrome/browser/ui/tab_contents/core_tab_helper.cc

Issue 8896009: Fix page zoom for plug-in documents (PDF, etc.) (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
- }
-}
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698