| 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" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 tray->SetNextFocusableView(this); | 341 tray->SetNextFocusableView(this); |
| 342 ash::Shell::GetInstance()->RotateFocus(reverse ? ash::Shell::BACKWARD : | 342 ash::Shell::GetInstance()->RotateFocus(reverse ? ash::Shell::BACKWARD : |
| 343 ash::Shell::FORWARD); | 343 ash::Shell::FORWARD); |
| 344 } | 344 } |
| 345 | 345 |
| 346 return true; | 346 return true; |
| 347 } | 347 } |
| 348 | 348 |
| 349 void WebUILoginView::RequestMediaAccessPermission( | 349 void WebUILoginView::RequestMediaAccessPermission( |
| 350 WebContents* web_contents, | 350 WebContents* web_contents, |
| 351 const content::MediaStreamRequest* request, | 351 const content::MediaStreamRequest& request, |
| 352 const content::MediaResponseCallback& callback) { | 352 const content::MediaResponseCallback& callback) { |
| 353 Profile* profile = | 353 Profile* profile = |
| 354 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 354 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| 355 | 355 |
| 356 scoped_ptr<MediaStreamDevicesController> controller( | 356 scoped_ptr<MediaStreamDevicesController> controller( |
| 357 new MediaStreamDevicesController(profile, request, callback)); | 357 new MediaStreamDevicesController(profile, request, callback)); |
| 358 if (!controller->DismissInfoBarAndTakeActionOnSettings()) | 358 if (!controller->DismissInfoBarAndTakeActionOnSettings()) |
| 359 NOTREACHED() << "Media stream not allowed for WebUI"; | 359 NOTREACHED() << "Media stream not allowed for WebUI"; |
| 360 } | 360 } |
| 361 | 361 |
| (...skipping 16 matching lines...) Expand all 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 |