When Retrier succeeds, record errors it encountered.
[chromium-blink-merge.git] / ui / base / events / event_utils.cc
blobac09854bbfb9319dc46ec2a018b1444212677993
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
3 // found in the LICENSE file.
5 #include "ui/base/events/event_utils.h"
7 #include "ui/base/events/event.h"
9 namespace ui {
11 namespace {
12 int g_custom_event_types = ET_LAST;
13 } // namespace
15 bool EventCanceledDefaultHandling(const Event& event) {
16 return event.phase() == EP_POSTTARGET && event.result() != ER_UNHANDLED;
19 int RegisterCustomEventType() {
20 return ++g_custom_event_types;
23 base::TimeDelta EventTimeForNow() {
24 return base::TimeDelta::FromInternalValue(
25 base::TimeTicks::Now().ToInternalValue());
28 } // namespace ui