| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/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" |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 14 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 15 #include "chrome/browser/chromeos/cros/cros_library.h" | 15 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 16 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" | 16 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" |
| 17 #include "chrome/browser/chromeos/login/webui_login_display.h" | 17 #include "chrome/browser/chromeos/login/webui_login_display.h" |
| 18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
| 19 #include "chrome/browser/renderer_preferences_util.h" |
| 19 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" | 20 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" |
| 20 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 21 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 21 #include "chrome/common/chrome_notification_types.h" | 22 #include "chrome/common/chrome_notification_types.h" |
| 22 #include "chrome/common/render_messages.h" | 23 #include "chrome/common/render_messages.h" |
| 23 #include "chromeos/dbus/dbus_thread_manager.h" | 24 #include "chromeos/dbus/dbus_thread_manager.h" |
| 24 #include "chromeos/dbus/session_manager_client.h" | 25 #include "chromeos/dbus/session_manager_client.h" |
| 25 #include "content/public/browser/notification_service.h" | 26 #include "content/public/browser/notification_service.h" |
| 26 #include "content/public/browser/render_view_host_observer.h" | 27 #include "content/public/browser/render_view_host_observer.h" |
| 27 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 28 #include "content/public/browser/web_ui.h" | 29 #include "content/public/browser/web_ui.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 tray->SetNextFocusableView(NULL); | 156 tray->SetNextFocusableView(NULL); |
| 156 } | 157 } |
| 157 | 158 |
| 158 void WebUILoginView::Init(views::Widget* login_window) { | 159 void WebUILoginView::Init(views::Widget* login_window) { |
| 159 login_window_ = login_window; | 160 login_window_ = login_window; |
| 160 webui_login_ = new views::WebView(ProfileManager::GetDefaultProfile()); | 161 webui_login_ = new views::WebView(ProfileManager::GetDefaultProfile()); |
| 161 AddChildView(webui_login_); | 162 AddChildView(webui_login_); |
| 162 | 163 |
| 163 WebContents* web_contents = webui_login_->GetWebContents(); | 164 WebContents* web_contents = webui_login_->GetWebContents(); |
| 164 web_contents->SetDelegate(this); | 165 web_contents->SetDelegate(this); |
| 166 renderer_preferences_util::UpdateFromSystemSettings( |
| 167 web_contents->GetMutableRendererPrefs(), |
| 168 ProfileManager::GetDefaultProfile()); |
| 165 | 169 |
| 166 tab_watcher_.reset(new TabRenderWatcher(web_contents, this)); | 170 tab_watcher_.reset(new TabRenderWatcher(web_contents, this)); |
| 167 } | 171 } |
| 168 | 172 |
| 169 std::string WebUILoginView::GetClassName() const { | 173 std::string WebUILoginView::GetClassName() const { |
| 170 return kViewClassName; | 174 return kViewClassName; |
| 171 } | 175 } |
| 172 | 176 |
| 173 bool WebUILoginView::AcceleratorPressed( | 177 bool WebUILoginView::AcceleratorPressed( |
| 174 const ui::Accelerator& accelerator) { | 178 const ui::Accelerator& accelerator) { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 return true; | 331 return true; |
| 328 } | 332 } |
| 329 | 333 |
| 330 void WebUILoginView::ReturnFocus(bool reverse) { | 334 void WebUILoginView::ReturnFocus(bool reverse) { |
| 331 // Return the focus to the web contents. | 335 // Return the focus to the web contents. |
| 332 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 336 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
| 333 GetWidget()->Activate(); | 337 GetWidget()->Activate(); |
| 334 } | 338 } |
| 335 | 339 |
| 336 } // namespace chromeos | 340 } // namespace chromeos |
| OLD | NEW |