Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / ui / input_events_blocker.cc
blob686c9070fde532f1a4f327d0040f40797effffa8
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
7 #include "ash/shell.h"
8 #include "base/logging.h"
9 #include "ui/events/event.h"
11 namespace chromeos {
13 InputEventsBlocker::InputEventsBlocker() {
14 ash::Shell::GetInstance()->PrependPreTargetHandler(this);
15 VLOG(1) << "InputEventsBlocker " << this << " created.";
18 InputEventsBlocker::~InputEventsBlocker() {
19 ash::Shell::GetInstance()->RemovePreTargetHandler(this);
20 VLOG(1) << "InputEventsBlocker " << this << " destroyed.";
23 void InputEventsBlocker::OnKeyEvent(ui::KeyEvent* event) {
24 event->StopPropagation();
27 void InputEventsBlocker::OnMouseEvent(ui::MouseEvent* event) {
28 event->StopPropagation();
31 void InputEventsBlocker::OnTouchEvent(ui::TouchEvent* event) {
32 event->StopPropagation();
35 void InputEventsBlocker::OnGestureEvent(ui::GestureEvent* event) {
36 event->StopPropagation();
39 } // namespace chromeos