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

Unified Diff: chrome/browser/chromeos/login/ui/webui_login_view.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/chromeos/login/ui/webui_login_view.cc
diff --git a/chrome/browser/chromeos/login/ui/webui_login_view.cc b/chrome/browser/chromeos/login/ui/webui_login_view.cc
index 42febae6d6b1cb088d26abe058069b3217ad0aee..97cd86a9f8d80e1656286e134660ca488e0c3f96 100644
--- a/chrome/browser/chromeos/login/ui/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/ui/webui_login_view.cc
@@ -32,12 +32,14 @@
#include "chromeos/network/network_state_handler.h"
#include "components/password_manager/core/browser/password_manager.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
+#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
+#include "content/public/common/renderer_preferences.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -200,9 +202,12 @@ void WebUILoginView::Init() {
extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
web_contents);
WebContentsObserver::Observe(web_contents);
- renderer_preferences_util::UpdateFromSystemSettings(
- web_contents->GetMutableRendererPrefs(),
- signin_profile);
+ content::RendererPreferences* prefs = web_contents->GetMutableRendererPrefs();
+ renderer_preferences_util::UpdateFromSystemSettings(prefs, signin_profile);
+ // TODO(wjmaclean): Convert this to use the HostZoomMap for the WebContents
+ // when HostZoomMap moves to StoragePartition.
+ prefs->default_zoom_level = content::HostZoomMap::GetDefaultForBrowserContext(
+ signin_profile)->GetDefaultZoomLevel();
}
const char* WebUILoginView::GetClassName() const {

Powered by Google App Engine
This is Rietveld 408576698