| 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/status_area_widget_delegate.h" | 9 #include "ash/system/status_area_widget_delegate.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 const GURL& security_origin, | 545 const GURL& security_origin, |
| 546 content::MediaStreamType type) { | 546 content::MediaStreamType type) { |
| 547 return MediaCaptureDevicesDispatcher::GetInstance() | 547 return MediaCaptureDevicesDispatcher::GetInstance() |
| 548 ->CheckMediaAccessPermission(web_contents, security_origin, type); | 548 ->CheckMediaAccessPermission(web_contents, security_origin, type); |
| 549 } | 549 } |
| 550 | 550 |
| 551 bool WebUILoginView::PreHandleGestureEvent( | 551 bool WebUILoginView::PreHandleGestureEvent( |
| 552 content::WebContents* source, | 552 content::WebContents* source, |
| 553 const blink::WebGestureEvent& event) { | 553 const blink::WebGestureEvent& event) { |
| 554 // Disable pinch zooming. | 554 // Disable pinch zooming. |
| 555 return event.GetType() == blink::WebGestureEvent::kGesturePinchBegin || | 555 return blink::WebInputEvent::IsPinchGestureEventType(event.GetType()); |
| 556 event.GetType() == blink::WebGestureEvent::kGesturePinchUpdate || | |
| 557 event.GetType() == blink::WebGestureEvent::kGesturePinchEnd; | |
| 558 } | 556 } |
| 559 | 557 |
| 560 void WebUILoginView::OnFocusOut(bool reverse) { | 558 void WebUILoginView::OnFocusOut(bool reverse) { |
| 561 AboutToRequestFocusFromTabTraversal(reverse); | 559 AboutToRequestFocusFromTabTraversal(reverse); |
| 562 } | 560 } |
| 563 | 561 |
| 564 void WebUILoginView::OnLoginPromptVisible() { | 562 void WebUILoginView::OnLoginPromptVisible() { |
| 565 // If we're hidden than will generate this signal once we're shown. | 563 // If we're hidden than will generate this signal once we're shown. |
| 566 if (is_hidden_ || webui_visible_) { | 564 if (is_hidden_ || webui_visible_) { |
| 567 VLOG(1) << "Login WebUI >> not emitting signal, hidden: " << is_hidden_; | 565 VLOG(1) << "Login WebUI >> not emitting signal, hidden: " << is_hidden_; |
| 568 return; | 566 return; |
| 569 } | 567 } |
| 570 TRACE_EVENT0("chromeos", "WebUILoginView::OnLoginPromptVisible"); | 568 TRACE_EVENT0("chromeos", "WebUILoginView::OnLoginPromptVisible"); |
| 571 if (should_emit_login_prompt_visible_) { | 569 if (should_emit_login_prompt_visible_) { |
| 572 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 570 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
| 573 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 571 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
| 574 EmitLoginPromptVisible(); | 572 EmitLoginPromptVisible(); |
| 575 } | 573 } |
| 576 | 574 |
| 577 webui_visible_ = true; | 575 webui_visible_ = true; |
| 578 } | 576 } |
| 579 | 577 |
| 580 } // namespace chromeos | 578 } // namespace chromeos |
| OLD | NEW |