Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: chrome/browser/chromeos/login/ui/webui_login_view.cc

Issue 2861373004: Add blink::WebInputEvent::IsPinchGestureEventType(). (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/bind.h" 10 #include "base/bind.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 const GURL& security_origin, 532 const GURL& security_origin,
533 content::MediaStreamType type) { 533 content::MediaStreamType type) {
534 return MediaCaptureDevicesDispatcher::GetInstance() 534 return MediaCaptureDevicesDispatcher::GetInstance()
535 ->CheckMediaAccessPermission(web_contents, security_origin, type); 535 ->CheckMediaAccessPermission(web_contents, security_origin, type);
536 } 536 }
537 537
538 bool WebUILoginView::PreHandleGestureEvent( 538 bool WebUILoginView::PreHandleGestureEvent(
539 content::WebContents* source, 539 content::WebContents* source,
540 const blink::WebGestureEvent& event) { 540 const blink::WebGestureEvent& event) {
541 // Disable pinch zooming. 541 // Disable pinch zooming.
542 return event.GetType() == blink::WebGestureEvent::kGesturePinchBegin || 542 return blink::WebInputEvent::IsPinchGestureEventType(event.GetType());
543 event.GetType() == blink::WebGestureEvent::kGesturePinchUpdate ||
544 event.GetType() == blink::WebGestureEvent::kGesturePinchEnd;
545 } 543 }
546 544
547 void WebUILoginView::OnLoginPromptVisible() { 545 void WebUILoginView::OnLoginPromptVisible() {
548 // If we're hidden than will generate this signal once we're shown. 546 // If we're hidden than will generate this signal once we're shown.
549 if (is_hidden_ || webui_visible_) { 547 if (is_hidden_ || webui_visible_) {
550 VLOG(1) << "Login WebUI >> not emitting signal, hidden: " << is_hidden_; 548 VLOG(1) << "Login WebUI >> not emitting signal, hidden: " << is_hidden_;
551 return; 549 return;
552 } 550 }
553 TRACE_EVENT0("chromeos", "WebUILoginView::OnLoginPromptVisible"); 551 TRACE_EVENT0("chromeos", "WebUILoginView::OnLoginPromptVisible");
554 if (should_emit_login_prompt_visible_) { 552 if (should_emit_login_prompt_visible_) {
555 VLOG(1) << "Login WebUI >> login-prompt-visible"; 553 VLOG(1) << "Login WebUI >> login-prompt-visible";
556 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> 554 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
557 EmitLoginPromptVisible(); 555 EmitLoginPromptVisible();
558 } 556 }
559 557
560 webui_visible_ = true; 558 webui_visible_ = true;
561 } 559 }
562 560
563 } // namespace chromeos 561 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698