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

Unified Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add proper method mock for BrowserContext::CreateZoomLevelDelegate() override. Created 6 years, 1 month 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
Index: chrome/browser/ui/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index cedb29767146d6c5ce194e2507186d567665edef..4d9987a98e1945a9ea69243c30615c9727886507 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -282,6 +282,9 @@ WrenchMenuModel::WrenchMenuModel(ui::AcceleratorProvider* provider,
Build();
UpdateZoomControls();
+ // By asking for the HostZoomMap via the BrowserContext, we get the map
+ // associated with the default storage partition, and not the one related
+ // to any specialized storage partitions, e.g. those used by WebViewGuests.
content_zoom_subscription_ =
content::HostZoomMap::GetDefaultForBrowserContext(browser->profile())
->AddZoomLevelChangedCallback(base::Bind(

Powered by Google App Engine
This is Rietveld 408576698