| Index: content/browser/web_contents/aura/types.cc
|
| diff --git a/content/browser/web_contents/aura/types.cc b/content/browser/web_contents/aura/types.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..77d32402b3e4598a53a583e48e68e94c72209f12
|
| --- /dev/null
|
| +++ b/content/browser/web_contents/aura/types.cc
|
| @@ -0,0 +1,26 @@
|
| +// 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 "content/browser/web_contents/aura/types.h"
|
| +
|
| +namespace content {
|
| +
|
| +UmaNavigationType GetUmaNavigationType(NavigationDirection direction,
|
| + OverscrollSource source) {
|
| + if (direction == NavigationDirection::NONE ||
|
| + source == OverscrollSource::NONE) {
|
| + return NAVIGATION_TYPE_NONE;
|
| + }
|
| + if (direction == NavigationDirection::BACK) {
|
| + return source == OverscrollSource::TOUCHPAD
|
| + ? UmaNavigationType::BACK_TOUCHPAD
|
| + : UmaNavigationType::BACK_TOUCHSCREEN;
|
| + }
|
| + DCHECK_EQ(direction, NavigationDirection::FORWARD);
|
| + return source == OverscrollSource::TOUCHPAD
|
| + ? UmaNavigationType::FORWARD_TOUCHPAD
|
| + : UmaNavigationType::FORWARD_TOUCHSCREEN;
|
| +}
|
| +
|
| +} // namespace content
|
|
|