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 1b7244dd14edd6951bcba44fbfb102c7d66ead7c..8e63a7066ea0f5a5c7ecf941087aa976b4c2c5b1 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(); |
+ |
web_contents_->GetRenderViewHost()->SyncRendererPrefs(); |
// Set |this| as a delegate so the ConstrainedWebDialogUI can retrieve it. |