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

Side by Side 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: Address comments. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 5 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/sessions/session_tab_helper.h" 25 #include "chrome/browser/sessions/session_tab_helper.h"
26 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" 26 #include "chrome/browser/ui/autofill/chrome_autofill_client.h"
27 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 27 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
28 #include "chrome/common/render_messages.h" 28 #include "chrome/common/render_messages.h"
29 #include "chromeos/dbus/dbus_thread_manager.h" 29 #include "chromeos/dbus/dbus_thread_manager.h"
30 #include "chromeos/dbus/session_manager_client.h" 30 #include "chromeos/dbus/session_manager_client.h"
31 #include "chromeos/network/network_state.h" 31 #include "chromeos/network/network_state.h"
32 #include "chromeos/network/network_state_handler.h" 32 #include "chromeos/network/network_state_handler.h"
33 #include "components/password_manager/core/browser/password_manager.h" 33 #include "components/password_manager/core/browser/password_manager.h"
34 #include "components/web_modal/web_contents_modal_dialog_manager.h" 34 #include "components/web_modal/web_contents_modal_dialog_manager.h"
35 #include "content/public/browser/host_zoom_map.h"
35 #include "content/public/browser/notification_service.h" 36 #include "content/public/browser/notification_service.h"
36 #include "content/public/browser/render_frame_host.h" 37 #include "content/public/browser/render_frame_host.h"
37 #include "content/public/browser/render_view_host.h" 38 #include "content/public/browser/render_view_host.h"
38 #include "content/public/browser/render_widget_host_view.h" 39 #include "content/public/browser/render_widget_host_view.h"
39 #include "content/public/browser/web_contents.h" 40 #include "content/public/browser/web_contents.h"
40 #include "content/public/browser/web_ui.h" 41 #include "content/public/browser/web_ui.h"
42 #include "content/public/common/renderer_preferences.h"
41 #include "third_party/WebKit/public/web/WebInputEvent.h" 43 #include "third_party/WebKit/public/web/WebInputEvent.h"
42 #include "ui/gfx/rect.h" 44 #include "ui/gfx/rect.h"
43 #include "ui/gfx/size.h" 45 #include "ui/gfx/size.h"
44 #include "ui/views/controls/webview/webview.h" 46 #include "ui/views/controls/webview/webview.h"
45 #include "ui/views/widget/widget.h" 47 #include "ui/views/widget/widget.h"
46 48
47 using content::NativeWebKeyboardEvent; 49 using content::NativeWebKeyboardEvent;
48 using content::RenderViewHost; 50 using content::RenderViewHost;
49 using content::WebContents; 51 using content::WebContents;
50 using web_modal::WebContentsModalDialogManager; 52 using web_modal::WebContentsModalDialogManager;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 WebContentsModalDialogManager::FromWebContents(web_contents)-> 205 WebContentsModalDialogManager::FromWebContents(web_contents)->
204 SetDelegate(this); 206 SetDelegate(this);
205 if (!popup_manager_.get()) 207 if (!popup_manager_.get())
206 popup_manager_.reset(new web_modal::PopupManager(this)); 208 popup_manager_.reset(new web_modal::PopupManager(this));
207 popup_manager_->RegisterWith(web_contents); 209 popup_manager_->RegisterWith(web_contents);
208 210
209 web_contents->SetDelegate(this); 211 web_contents->SetDelegate(this);
210 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( 212 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
211 web_contents); 213 web_contents);
212 WebContentsObserver::Observe(web_contents); 214 WebContentsObserver::Observe(web_contents);
213 renderer_preferences_util::UpdateFromSystemSettings( 215 content::RendererPreferences* prefs = web_contents->GetMutableRendererPrefs();
214 web_contents->GetMutableRendererPrefs(), 216 renderer_preferences_util::UpdateFromSystemSettings(prefs, signin_profile);
215 signin_profile); 217 // TODO(wjmaclean): Convert this to use the HostZoomMap for the WebContents
218 // when HostZoomMap moves to StoragePartition.
219 prefs->default_zoom_level = content::HostZoomMap::GetDefaultForBrowserContext(
220 signin_profile)->GetDefaultZoomLevel();
216 } 221 }
217 222
218 const char* WebUILoginView::GetClassName() const { 223 const char* WebUILoginView::GetClassName() const {
219 return kViewClassName; 224 return kViewClassName;
220 } 225 }
221 226
222 void WebUILoginView::RequestFocus() { 227 void WebUILoginView::RequestFocus() {
223 webui_login_->RequestFocus(); 228 webui_login_->RequestFocus();
224 } 229 }
225 230
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 webui_visible_ = true; 490 webui_visible_ = true;
486 } 491 }
487 492
488 void WebUILoginView::ReturnFocus(bool reverse) { 493 void WebUILoginView::ReturnFocus(bool reverse) {
489 // Return the focus to the web contents. 494 // Return the focus to the web contents.
490 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 495 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
491 GetWidget()->Activate(); 496 GetWidget()->Activate();
492 } 497 }
493 498
494 } // namespace chromeos 499 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698