| OLD | NEW |
| 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/focus_cycler.h" | 7 #include "ash/focus_cycler.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/status_area_widget_delegate.h" | 9 #include "ash/system/status_area_widget_delegate.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| 11 #include "ash/system/tray/system_tray_notifier.h" | 11 #include "ash/system/tray/system_tray_notifier.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "chrome/browser/chrome_notification_types.h" | 20 #include "chrome/browser/chrome_notification_types.h" |
| 21 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 21 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 22 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 22 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 23 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 23 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 24 #include "chrome/browser/chromeos/login/ui/preloaded_web_view.h" | 24 #include "chrome/browser/chromeos/login/ui/preloaded_web_view.h" |
| 25 #include "chrome/browser/chromeos/login/ui/preloaded_web_view_factory.h" | 25 #include "chrome/browser/chromeos/login/ui/preloaded_web_view_factory.h" |
| 26 #include "chrome/browser/chromeos/login/ui/proxy_settings_dialog.h" | 26 #include "chrome/browser/chromeos/login/ui/proxy_settings_dialog.h" |
| 27 #include "chrome/browser/chromeos/login/ui/web_contents_forced_title.h" | 27 #include "chrome/browser/chromeos/login/ui/web_contents_forced_title.h" |
| 28 #include "chrome/browser/chromeos/login/ui/web_contents_set_background_color.h" | |
| 29 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" | 28 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" |
| 30 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 29 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 31 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 30 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 32 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 31 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
| 33 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 32 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 34 #include "chrome/browser/renderer_preferences_util.h" | 33 #include "chrome/browser/renderer_preferences_util.h" |
| 35 #include "chrome/browser/sessions/session_tab_helper.h" | 34 #include "chrome/browser/sessions/session_tab_helper.h" |
| 36 #include "chrome/browser/ui/ash/ash_util.h" | 35 #include "chrome/browser/ui/ash/ash_util.h" |
| 37 #include "chrome/browser/ui/ash/system_tray_client.h" | 36 #include "chrome/browser/ui/ash/system_tray_client.h" |
| 38 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 37 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 50 #include "content/public/browser/render_widget_host.h" | 49 #include "content/public/browser/render_widget_host.h" |
| 51 #include "content/public/browser/render_widget_host_view.h" | 50 #include "content/public/browser/render_widget_host_view.h" |
| 52 #include "content/public/browser/web_contents.h" | 51 #include "content/public/browser/web_contents.h" |
| 53 #include "content/public/browser/web_ui.h" | 52 #include "content/public/browser/web_ui.h" |
| 54 #include "content/public/common/renderer_preferences.h" | 53 #include "content/public/common/renderer_preferences.h" |
| 55 #include "extensions/browser/view_type_utils.h" | 54 #include "extensions/browser/view_type_utils.h" |
| 56 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 55 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 57 #include "ui/gfx/geometry/rect.h" | 56 #include "ui/gfx/geometry/rect.h" |
| 58 #include "ui/gfx/geometry/size.h" | 57 #include "ui/gfx/geometry/size.h" |
| 59 #include "ui/keyboard/keyboard_controller.h" | 58 #include "ui/keyboard/keyboard_controller.h" |
| 59 #include "ui/views/controls/webview/web_contents_set_background_color.h" |
| 60 #include "ui/views/controls/webview/webview.h" | 60 #include "ui/views/controls/webview/webview.h" |
| 61 #include "ui/views/widget/widget.h" | 61 #include "ui/views/widget/widget.h" |
| 62 | 62 |
| 63 using content::NativeWebKeyboardEvent; | 63 using content::NativeWebKeyboardEvent; |
| 64 using content::RenderViewHost; | 64 using content::RenderViewHost; |
| 65 using content::WebContents; | 65 using content::WebContents; |
| 66 using web_modal::WebContentsModalDialogManager; | 66 using web_modal::WebContentsModalDialogManager; |
| 67 | 67 |
| 68 namespace { | 68 namespace { |
| 69 | 69 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 } | 213 } |
| 214 | 214 |
| 215 // static | 215 // static |
| 216 void WebUILoginView::InitializeWebView(views::WebView* web_view, | 216 void WebUILoginView::InitializeWebView(views::WebView* web_view, |
| 217 const base::string16& title) { | 217 const base::string16& title) { |
| 218 WebContents* web_contents = web_view->GetWebContents(); | 218 WebContents* web_contents = web_view->GetWebContents(); |
| 219 | 219 |
| 220 if (!title.empty()) | 220 if (!title.empty()) |
| 221 WebContentsForcedTitle::CreateForWebContentsWithTitle(web_contents, title); | 221 WebContentsForcedTitle::CreateForWebContentsWithTitle(web_contents, title); |
| 222 | 222 |
| 223 WebContentsSetBackgroundColor::CreateForWebContentsWithColor( | 223 views::WebContentsSetBackgroundColor::CreateForWebContentsWithColor( |
| 224 web_contents, SK_ColorTRANSPARENT); | 224 web_contents, SK_ColorTRANSPARENT); |
| 225 | 225 |
| 226 // Ensure that the login UI has a tab ID, which will allow the GAIA auth | 226 // Ensure that the login UI has a tab ID, which will allow the GAIA auth |
| 227 // extension's background script to tell it apart from a captive portal window | 227 // extension's background script to tell it apart from a captive portal window |
| 228 // that may be opened on top of this UI. | 228 // that may be opened on top of this UI. |
| 229 SessionTabHelper::CreateForWebContents(web_contents); | 229 SessionTabHelper::CreateForWebContents(web_contents); |
| 230 | 230 |
| 231 // Create the password manager that is needed for the proxy. | 231 // Create the password manager that is needed for the proxy. |
| 232 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( | 232 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( |
| 233 web_contents, | 233 web_contents, |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 if (should_emit_login_prompt_visible_) { | 569 if (should_emit_login_prompt_visible_) { |
| 570 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 570 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
| 571 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 571 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 572 EmitLoginPromptVisible(); | 572 EmitLoginPromptVisible(); |
| 573 } | 573 } |
| 574 | 574 |
| 575 webui_visible_ = true; | 575 webui_visible_ = true; |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace chromeos | 578 } // namespace chromeos |
| OLD | NEW |