| 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/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
| 10 #include "ash/wm_shell.h" | 10 #include "ash/wm_shell.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 22 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 23 #include "chrome/browser/chromeos/login/ui/preloaded_web_view.h" | 23 #include "chrome/browser/chromeos/login/ui/preloaded_web_view.h" |
| 24 #include "chrome/browser/chromeos/login/ui/preloaded_web_view_factory.h" | 24 #include "chrome/browser/chromeos/login/ui/preloaded_web_view_factory.h" |
| 25 #include "chrome/browser/chromeos/login/ui/proxy_settings_dialog.h" | 25 #include "chrome/browser/chromeos/login/ui/proxy_settings_dialog.h" |
| 26 #include "chrome/browser/chromeos/login/ui/web_contents_forced_title.h" | 26 #include "chrome/browser/chromeos/login/ui/web_contents_forced_title.h" |
| 27 #include "chrome/browser/chromeos/login/ui/web_contents_set_background_color.h" | 27 #include "chrome/browser/chromeos/login/ui/web_contents_set_background_color.h" |
| 28 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" | 28 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" |
| 29 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 29 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 30 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 30 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 31 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 31 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
| 32 #include "chrome/browser/media/webrtc/media_stream_devices_controller.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" |
| 39 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 38 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 40 #include "chromeos/dbus/dbus_thread_manager.h" | 39 #include "chromeos/dbus/dbus_thread_manager.h" |
| 41 #include "chromeos/dbus/session_manager_client.h" | 40 #include "chromeos/dbus/session_manager_client.h" |
| 42 #include "chromeos/network/network_state.h" | 41 #include "chromeos/network/network_state.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 466 |
| 468 return true; | 467 return true; |
| 469 } | 468 } |
| 470 | 469 |
| 471 void WebUILoginView::RequestMediaAccessPermission( | 470 void WebUILoginView::RequestMediaAccessPermission( |
| 472 WebContents* web_contents, | 471 WebContents* web_contents, |
| 473 const content::MediaStreamRequest& request, | 472 const content::MediaStreamRequest& request, |
| 474 const content::MediaResponseCallback& callback) { | 473 const content::MediaResponseCallback& callback) { |
| 475 // Note: This is needed for taking photos when selecting new user images | 474 // Note: This is needed for taking photos when selecting new user images |
| 476 // and SAML logins. Must work for all user types (including supervised). | 475 // and SAML logins. Must work for all user types (including supervised). |
| 477 MediaStreamDevicesController::RequestPermissions(web_contents, request, | 476 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
| 478 callback); | 477 web_contents, request, callback, nullptr /* extension */); |
| 479 } | 478 } |
| 480 | 479 |
| 481 bool WebUILoginView::CheckMediaAccessPermission( | 480 bool WebUILoginView::CheckMediaAccessPermission( |
| 482 content::WebContents* web_contents, | 481 content::WebContents* web_contents, |
| 483 const GURL& security_origin, | 482 const GURL& security_origin, |
| 484 content::MediaStreamType type) { | 483 content::MediaStreamType type) { |
| 485 return MediaCaptureDevicesDispatcher::GetInstance() | 484 return MediaCaptureDevicesDispatcher::GetInstance() |
| 486 ->CheckMediaAccessPermission(web_contents, security_origin, type); | 485 ->CheckMediaAccessPermission(web_contents, security_origin, type); |
| 487 } | 486 } |
| 488 | 487 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 505 if (should_emit_login_prompt_visible_) { | 504 if (should_emit_login_prompt_visible_) { |
| 506 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 505 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
| 507 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 506 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 508 EmitLoginPromptVisible(); | 507 EmitLoginPromptVisible(); |
| 509 } | 508 } |
| 510 | 509 |
| 511 webui_visible_ = true; | 510 webui_visible_ = true; |
| 512 } | 511 } |
| 513 | 512 |
| 514 } // namespace chromeos | 513 } // namespace chromeos |
| OLD | NEW |