OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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. |
| 4 |
| 5 #include "content/browser/web_contents/aura/types.h" |
| 6 |
| 7 namespace content { |
| 8 |
| 9 UmaNavigationType GetUmaNavigationType(NavigationDirection direction, |
| 10 OverscrollSource source) { |
| 11 if (direction == NavigationDirection::NONE || |
| 12 source == OverscrollSource::NONE) { |
| 13 return NAVIGATION_TYPE_NONE; |
| 14 } |
| 15 if (direction == NavigationDirection::BACK) { |
| 16 return source == OverscrollSource::TOUCHPAD |
| 17 ? UmaNavigationType::BACK_TOUCHPAD |
| 18 : UmaNavigationType::BACK_TOUCHSCREEN; |
| 19 } |
| 20 DCHECK_EQ(direction, NavigationDirection::FORWARD); |
| 21 return source == OverscrollSource::TOUCHPAD |
| 22 ? UmaNavigationType::FORWARD_TOUCHPAD |
| 23 : UmaNavigationType::FORWARD_TOUCHSCREEN; |
| 24 } |
| 25 |
| 26 } // namespace content |
OLD | NEW |