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

Unified Diff: chrome/browser/ui/webui/constrained_web_dialog_delegate_base.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: Convert to using only profile prefs. 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/webui/constrained_web_dialog_delegate_base.cc
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc
index a2b05b9f56972f56b9668bd2eea7fa5da7d3f85e..4ae0b4a4160cb1e5793ddd794db938ab27cc714a 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc
+++ b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc
@@ -9,8 +9,10 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_preferences_util.h"
#include "chrome/browser/ui/webui/chrome_web_contents_handler.h"
+#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/renderer_preferences.h"
#include "ipc/ipc_message.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
#include "ui/web_dialogs/web_dialog_ui.h"
@@ -38,9 +40,13 @@ ConstrainedWebDialogDelegateBase::ConstrainedWebDialogDelegateBase(
} else {
web_contents_->SetDelegate(this);
}
+ content::RendererPreferences* prefs =
+ web_contents_->GetMutableRendererPrefs();
renderer_preferences_util::UpdateFromSystemSettings(
- web_contents_->GetMutableRendererPrefs(),
- Profile::FromBrowserContext(browser_context));
+ prefs, Profile::FromBrowserContext(browser_context));
+ prefs->default_zoom_level = ZoomController::FromWebContents(
+ web_contents_.get())->GetDefaultZoomLevel();
Bernhard Bauer 2014/10/01 15:09:14 Also indent just four spaces w/r/t the previous li
wjmaclean 2014/10/01 20:33:00 Done. The style-guide isn't terribly clear in this
+
web_contents_->GetRenderViewHost()->SyncRendererPrefs();
// Set |this| as a delegate so the ConstrainedWebDialogUI can retrieve it.

Powered by Google App Engine
This is Rietveld 408576698