| 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/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 23 matching lines...) Expand all Loading... |
| 34 #include "components/password_manager/core/browser/password_manager.h" | 34 #include "components/password_manager/core/browser/password_manager.h" |
| 35 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 35 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 36 #include "content/public/browser/notification_service.h" | 36 #include "content/public/browser/notification_service.h" |
| 37 #include "content/public/browser/render_frame_host.h" | 37 #include "content/public/browser/render_frame_host.h" |
| 38 #include "content/public/browser/render_view_host.h" | 38 #include "content/public/browser/render_view_host.h" |
| 39 #include "content/public/browser/render_widget_host.h" | 39 #include "content/public/browser/render_widget_host.h" |
| 40 #include "content/public/browser/render_widget_host_view.h" | 40 #include "content/public/browser/render_widget_host_view.h" |
| 41 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
| 42 #include "content/public/browser/web_ui.h" | 42 #include "content/public/browser/web_ui.h" |
| 43 #include "content/public/common/renderer_preferences.h" | 43 #include "content/public/common/renderer_preferences.h" |
| 44 #include "extensions/browser/view_type_utils.h" |
| 44 #include "third_party/WebKit/public/web/WebInputEvent.h" | 45 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 45 #include "ui/gfx/geometry/rect.h" | 46 #include "ui/gfx/geometry/rect.h" |
| 46 #include "ui/gfx/geometry/size.h" | 47 #include "ui/gfx/geometry/size.h" |
| 47 #include "ui/views/controls/webview/webview.h" | 48 #include "ui/views/controls/webview/webview.h" |
| 48 #include "ui/views/widget/widget.h" | 49 #include "ui/views/widget/widget.h" |
| 49 | 50 |
| 50 using content::NativeWebKeyboardEvent; | 51 using content::NativeWebKeyboardEvent; |
| 51 using content::RenderViewHost; | 52 using content::RenderViewHost; |
| 52 using content::WebContents; | 53 using content::WebContents; |
| 53 using web_modal::WebContentsModalDialogManager; | 54 using web_modal::WebContentsModalDialogManager; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( | 190 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( |
| 190 web_contents, | 191 web_contents, |
| 191 autofill::ChromeAutofillClient::FromWebContents(web_contents)); | 192 autofill::ChromeAutofillClient::FromWebContents(web_contents)); |
| 192 | 193 |
| 193 // LoginHandlerViews uses a constrained window for the password manager view. | 194 // LoginHandlerViews uses a constrained window for the password manager view. |
| 194 WebContentsModalDialogManager::CreateForWebContents(web_contents); | 195 WebContentsModalDialogManager::CreateForWebContents(web_contents); |
| 195 WebContentsModalDialogManager::FromWebContents(web_contents)-> | 196 WebContentsModalDialogManager::FromWebContents(web_contents)-> |
| 196 SetDelegate(this); | 197 SetDelegate(this); |
| 197 | 198 |
| 198 web_contents->SetDelegate(this); | 199 web_contents->SetDelegate(this); |
| 200 extensions::SetViewType(web_contents, extensions::VIEW_TYPE_EXTENSION_OTHER); |
| 199 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 201 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
| 200 web_contents); | 202 web_contents); |
| 201 content::RendererPreferences* prefs = web_contents->GetMutableRendererPrefs(); | 203 content::RendererPreferences* prefs = web_contents->GetMutableRendererPrefs(); |
| 202 renderer_preferences_util::UpdateFromSystemSettings( | 204 renderer_preferences_util::UpdateFromSystemSettings( |
| 203 prefs, signin_profile, web_contents); | 205 prefs, signin_profile, web_contents); |
| 204 } | 206 } |
| 205 | 207 |
| 206 const char* WebUILoginView::GetClassName() const { | 208 const char* WebUILoginView::GetClassName() const { |
| 207 return kViewClassName; | 209 return kViewClassName; |
| 208 } | 210 } |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 if (should_emit_login_prompt_visible_) { | 466 if (should_emit_login_prompt_visible_) { |
| 465 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 467 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
| 466 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 468 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 467 EmitLoginPromptVisible(); | 469 EmitLoginPromptVisible(); |
| 468 } | 470 } |
| 469 | 471 |
| 470 webui_visible_ = true; | 472 webui_visible_ = true; |
| 471 } | 473 } |
| 472 | 474 |
| 473 } // namespace chromeos | 475 } // namespace chromeos |
| OLD | NEW |