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

Unified Diff: chrome/browser/ui/pdf/pdf_unsupported_feature.cc

Issue 541103002: Introduce ChromeZoomLevelPref, make zoom level prefs independent of profile prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: chrome/browser/ui/pdf/pdf_unsupported_feature.cc
diff --git a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
index d1a351dfa85cb9e18d3caefbe6019275b7e4ff81..d8ad0ebbcc33ca9284921725ceb075cb9211304d 100644
--- a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
+++ b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
@@ -18,6 +18,7 @@
#include "chrome/grit/generated_resources.h"
#include "components/pdf/browser/open_pdf_in_reader_prompt_client.h"
#include "components/pdf/browser/pdf_web_contents_helper.h"
+#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/interstitial_page_delegate.h"
#include "content/public/browser/navigation_details.h"
@@ -28,6 +29,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/renderer_preferences.h"
#include "grit/browser_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -219,6 +221,11 @@ class PDFUnsupportedFeatureInterstitial
Profile* profile =
Profile::FromBrowserContext(web_contents_->GetBrowserContext());
renderer_preferences_util::UpdateFromSystemSettings(prefs, profile);
+ // TODO(wjmaclean): Convert this to use the HostZoomMap for the WebContents
+ // when HostZoomMap moves to StoragePartition.
+ prefs->default_zoom_level =
+ content::HostZoomMap::GetDefaultForBrowserContext(profile)
+ ->GetDefaultZoomLevel();
}
private:

Powered by Google App Engine
This is Rietveld 408576698