| 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/common/focus_cycler.h" | 7 #include "ash/common/focus_cycler.h" |
| 8 #include "ash/common/system/tray/system_tray.h" | 8 #include "ash/common/system/tray/system_tray.h" |
| 9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 } | 470 } |
| 471 | 471 |
| 472 return true; | 472 return true; |
| 473 } | 473 } |
| 474 | 474 |
| 475 void WebUILoginView::RequestMediaAccessPermission( | 475 void WebUILoginView::RequestMediaAccessPermission( |
| 476 WebContents* web_contents, | 476 WebContents* web_contents, |
| 477 const content::MediaStreamRequest& request, | 477 const content::MediaStreamRequest& request, |
| 478 const content::MediaResponseCallback& callback) { | 478 const content::MediaResponseCallback& callback) { |
| 479 // Note: This is only needed for SAML logins. | 479 // Note: This is only needed for SAML logins. |
| 480 MediaStreamDevicesController controller(web_contents, request, callback); | 480 MediaStreamDevicesController::RequestPermissions(web_contents, request, |
| 481 DCHECK(!controller.IsAskingForAudio() && !controller.IsAskingForVideo()); | 481 callback); |
| 482 } | 482 } |
| 483 | 483 |
| 484 bool WebUILoginView::CheckMediaAccessPermission( | 484 bool WebUILoginView::CheckMediaAccessPermission( |
| 485 content::WebContents* web_contents, | 485 content::WebContents* web_contents, |
| 486 const GURL& security_origin, | 486 const GURL& security_origin, |
| 487 content::MediaStreamType type) { | 487 content::MediaStreamType type) { |
| 488 return MediaCaptureDevicesDispatcher::GetInstance() | 488 return MediaCaptureDevicesDispatcher::GetInstance() |
| 489 ->CheckMediaAccessPermission(web_contents, security_origin, type); | 489 ->CheckMediaAccessPermission(web_contents, security_origin, type); |
| 490 } | 490 } |
| 491 | 491 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 508 if (should_emit_login_prompt_visible_) { | 508 if (should_emit_login_prompt_visible_) { |
| 509 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 509 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
| 510 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 510 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 511 EmitLoginPromptVisible(); | 511 EmitLoginPromptVisible(); |
| 512 } | 512 } |
| 513 | 513 |
| 514 webui_visible_ = true; | 514 webui_visible_ = true; |
| 515 } | 515 } |
| 516 | 516 |
| 517 } // namespace chromeos | 517 } // namespace chromeos |
| OLD | NEW |