| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 void WebUILoginView::RequestMediaAccessPermission( | 389 void WebUILoginView::RequestMediaAccessPermission( |
| 390 WebContents* web_contents, | 390 WebContents* web_contents, |
| 391 const content::MediaStreamRequest& request, | 391 const content::MediaStreamRequest& request, |
| 392 const content::MediaResponseCallback& callback) { | 392 const content::MediaResponseCallback& callback) { |
| 393 if (MediaStreamInfoBarDelegate::Create(web_contents, request, callback)) | 393 if (MediaStreamInfoBarDelegate::Create(web_contents, request, callback)) |
| 394 NOTREACHED() << "Media stream not allowed for WebUI"; | 394 NOTREACHED() << "Media stream not allowed for WebUI"; |
| 395 } | 395 } |
| 396 | 396 |
| 397 void WebUILoginView::DidFailProvisionalLoad( | 397 void WebUILoginView::DidFailProvisionalLoad( |
| 398 int64 frame_id, | 398 int64 frame_id, |
| 399 const string16& frame_unique_name, | 399 const base::string16& frame_unique_name, |
| 400 bool is_main_frame, | 400 bool is_main_frame, |
| 401 const GURL& validated_url, | 401 const GURL& validated_url, |
| 402 int error_code, | 402 int error_code, |
| 403 const string16& error_description, | 403 const base::string16& error_description, |
| 404 content::RenderViewHost* render_view_host) { | 404 content::RenderViewHost* render_view_host) { |
| 405 if (frame_unique_name != UTF8ToUTF16("gaia-frame")) | 405 if (frame_unique_name != UTF8ToUTF16("gaia-frame")) |
| 406 return; | 406 return; |
| 407 | 407 |
| 408 base::FundamentalValue error_value(-error_code); | 408 base::FundamentalValue error_value(-error_code); |
| 409 GetWebUI()->CallJavascriptFunction("login.GaiaSigninScreen.onFrameError", | 409 GetWebUI()->CallJavascriptFunction("login.GaiaSigninScreen.onFrameError", |
| 410 error_value); | 410 error_value); |
| 411 } | 411 } |
| 412 | 412 |
| 413 void WebUILoginView::OnLoginPromptVisible() { | 413 void WebUILoginView::OnLoginPromptVisible() { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 427 webui_visible_ = true; | 427 webui_visible_ = true; |
| 428 } | 428 } |
| 429 | 429 |
| 430 void WebUILoginView::ReturnFocus(bool reverse) { | 430 void WebUILoginView::ReturnFocus(bool reverse) { |
| 431 // Return the focus to the web contents. | 431 // Return the focus to the web contents. |
| 432 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 432 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
| 433 GetWidget()->Activate(); | 433 GetWidget()->Activate(); |
| 434 } | 434 } |
| 435 | 435 |
| 436 } // namespace chromeos | 436 } // namespace chromeos |
| OLD | NEW |