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

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: 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 WebContentsModalDialogManager::FromWebContents(web_contents)-> 195 WebContentsModalDialogManager::FromWebContents(web_contents)->
194 SetDelegate(this); 196 SetDelegate(this);
195 if (!popup_manager_.get()) 197 if (!popup_manager_.get())
196 popup_manager_.reset(new web_modal::PopupManager(this)); 198 popup_manager_.reset(new web_modal::PopupManager(this));
197 popup_manager_->RegisterWith(web_contents); 199 popup_manager_->RegisterWith(web_contents);
198 200
199 web_contents->SetDelegate(this); 201 web_contents->SetDelegate(this);
200 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( 202 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
201 web_contents); 203 web_contents);
202 WebContentsObserver::Observe(web_contents); 204 WebContentsObserver::Observe(web_contents);
203 renderer_preferences_util::UpdateFromSystemSettings( 205 content::RendererPreferences* prefs = web_contents->GetMutableRendererPrefs();
204 web_contents->GetMutableRendererPrefs(), 206 renderer_preferences_util::UpdateFromSystemSettings(prefs, signin_profile);
205 signin_profile); 207 // TODO(wjmaclean): Convert this to use the HostZoomMap for the WebContents
208 // when HostZoomMap moves to StoragePartition.
209 prefs->default_zoom_level = content::HostZoomMap::GetDefaultForBrowserContext(
210 signin_profile)->GetDefaultZoomLevel();
206 } 211 }
207 212
208 const char* WebUILoginView::GetClassName() const { 213 const char* WebUILoginView::GetClassName() const {
209 return kViewClassName; 214 return kViewClassName;
210 } 215 }
211 216
212 void WebUILoginView::RequestFocus() { 217 void WebUILoginView::RequestFocus() {
213 webui_login_->RequestFocus(); 218 webui_login_->RequestFocus();
214 } 219 }
215 220
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 webui_visible_ = true; 480 webui_visible_ = true;
476 } 481 }
477 482
478 void WebUILoginView::ReturnFocus(bool reverse) { 483 void WebUILoginView::ReturnFocus(bool reverse) {
479 // Return the focus to the web contents. 484 // Return the focus to the web contents.
480 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 485 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
481 GetWidget()->Activate(); 486 GetWidget()->Activate();
482 } 487 }
483 488
484 } // namespace chromeos 489 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698