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/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 15 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
16 #include "chrome/browser/chromeos/cros/cros_library.h" | 16 #include "chrome/browser/chromeos/cros/cros_library.h" |
17 #include "chrome/browser/chromeos/login/base_login_display_host.h" | 17 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
18 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" | 18 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" |
19 #include "chrome/browser/chromeos/login/webui_login_display.h" | 19 #include "chrome/browser/chromeos/login/webui_login_display.h" |
20 #include "chrome/browser/media/media_stream_devices_controller.h" | 20 #include "chrome/browser/media/media_stream_devices_controller.h" |
21 #include "chrome/browser/password_manager/password_manager.h" | 21 #include "chrome/browser/password_manager/password_manager.h" |
22 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" | 22 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" |
23 #include "chrome/browser/profiles/profile_manager.h" | 23 #include "chrome/browser/profiles/profile_manager.h" |
24 #include "chrome/browser/renderer_preferences_util.h" | 24 #include "chrome/browser/renderer_preferences_util.h" |
25 #include "chrome/browser/ui/constrained_window_tab_helper.h" | 25 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" |
26 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 26 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
27 #include "chrome/common/chrome_notification_types.h" | 27 #include "chrome/common/chrome_notification_types.h" |
28 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
29 #include "chrome/common/render_messages.h" | 29 #include "chrome/common/render_messages.h" |
30 #include "chromeos/dbus/dbus_thread_manager.h" | 30 #include "chromeos/dbus/dbus_thread_manager.h" |
31 #include "chromeos/dbus/session_manager_client.h" | 31 #include "chromeos/dbus/session_manager_client.h" |
32 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
33 #include "content/public/browser/render_view_host.h" | 33 #include "content/public/browser/render_view_host.h" |
34 #include "content/public/browser/render_view_host_observer.h" | 34 #include "content/public/browser/render_view_host_observer.h" |
35 #include "content/public/browser/render_widget_host_view.h" | 35 #include "content/public/browser/render_widget_host_view.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 AddChildView(webui_login_); | 154 AddChildView(webui_login_); |
155 | 155 |
156 WebContents* web_contents = webui_login_->GetWebContents(); | 156 WebContents* web_contents = webui_login_->GetWebContents(); |
157 | 157 |
158 // Create the password manager that is needed for the proxy. | 158 // Create the password manager that is needed for the proxy. |
159 PasswordManagerDelegateImpl::CreateForWebContents(web_contents); | 159 PasswordManagerDelegateImpl::CreateForWebContents(web_contents); |
160 PasswordManager::CreateForWebContentsAndDelegate( | 160 PasswordManager::CreateForWebContentsAndDelegate( |
161 web_contents, PasswordManagerDelegateImpl::FromWebContents(web_contents)); | 161 web_contents, PasswordManagerDelegateImpl::FromWebContents(web_contents)); |
162 | 162 |
163 // LoginHandlerViews uses a constrained window for the password manager view. | 163 // LoginHandlerViews uses a constrained window for the password manager view. |
164 ConstrainedWindowTabHelper::CreateForWebContents(web_contents); | 164 WebContentsModalDialogManager::CreateForWebContents(web_contents); |
165 | 165 |
166 web_contents->SetDelegate(this); | 166 web_contents->SetDelegate(this); |
167 renderer_preferences_util::UpdateFromSystemSettings( | 167 renderer_preferences_util::UpdateFromSystemSettings( |
168 web_contents->GetMutableRendererPrefs(), | 168 web_contents->GetMutableRendererPrefs(), |
169 ProfileManager::GetDefaultProfile()); | 169 ProfileManager::GetDefaultProfile()); |
170 | 170 |
171 registrar_.Add(this, | 171 registrar_.Add(this, |
172 content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, | 172 content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, |
173 content::Source<WebContents>(web_contents)); | 173 content::Source<WebContents>(web_contents)); |
174 } | 174 } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 aura::Env::GetInstance()->set_render_white_bg(true); | 378 aura::Env::GetInstance()->set_render_white_bg(true); |
379 } | 379 } |
380 | 380 |
381 void WebUILoginView::ReturnFocus(bool reverse) { | 381 void WebUILoginView::ReturnFocus(bool reverse) { |
382 // Return the focus to the web contents. | 382 // Return the focus to the web contents. |
383 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 383 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
384 GetWidget()->Activate(); | 384 GetWidget()->Activate(); |
385 } | 385 } |
386 | 386 |
387 } // namespace chromeos | 387 } // namespace chromeos |
OLD | NEW |