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

Unified Diff: chrome/browser/host_zoom_map.cc

Issue 2637006: Adds notification of when zoom level changes. I'm going to need this (Closed)
Patch Set: url -> string Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/notification_type.h » ('j') | chrome/common/notification_type.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/host_zoom_map.cc
diff --git a/chrome/browser/host_zoom_map.cc b/chrome/browser/host_zoom_map.cc
index 60dd91deedbeaffec1b294885b5134894a52ee86..50e15192843000e8a67ac0667273e2b6e899acda 100644
--- a/chrome/browser/host_zoom_map.cc
+++ b/chrome/browser/host_zoom_map.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/scoped_pref_update.h"
#include "chrome/common/notification_details.h"
+#include "chrome/common/notification_service.h"
#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
@@ -78,6 +79,11 @@ void HostZoomMap::SetZoomLevel(const GURL& url, int level) {
host_zoom_levels_[host] = level;
}
+ Details<std::string> details(&host);
+ NotificationService::current()->Notify(NotificationType::ZOOM_LEVEL_CHANGED,
+ Source<Profile>(profile_),
+ details);
Peter Kasting 2010/06/08 17:54:00 Nit: You can fit this on two lines
+
// If we're in incognito mode, don't persist changes to the prefs. We'll keep
// them in memory only so they will be forgotten on exiting incognito.
if (profile_->IsOffTheRecord())
« no previous file with comments | « no previous file | chrome/common/notification_type.h » ('j') | chrome/common/notification_type.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698