Chromium Code Reviews| Index: third_party/WebKit/Source/modules/media_controls/elements/MediaControlElementsHelper.cpp |
| diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlElementsHelper.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlElementsHelper.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0734977ad76573ce802bb42cb2b978b492752beb |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlElementsHelper.cpp |
| @@ -0,0 +1,19 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "modules/media_controls/elements/MediaControlElementsHelper.h" |
| + |
| +#include "core/events/Event.h" |
| + |
| +namespace blink { |
| + |
| +// static |
| +bool MediaControlElementsHelper::IsUserInteractionEvent(Event* event) { |
| + const AtomicString& type = event->type(); |
| + return type == EventTypeNames::mousedown || type == EventTypeNames::mouseup || |
| + type == EventTypeNames::click || type == EventTypeNames::dblclick || |
| + event->IsKeyboardEvent() || event->IsTouchEvent(); |
|
whywhat
2017/04/12 15:36:41
q: would isTouchEvent() return true if I fling ove
mlamouri (slow - plz ping)
2017/04/13 21:59:54
It's not meant to check for user gesture but user
|
| +} |
| + |
| +} // namespace blink |