| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.
h" | 5 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.
h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/mac/objc_property_releaser.h" | 11 #include "base/mac/objc_property_releaser.h" |
| 12 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
| 13 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
| 14 #import "ios/chrome/browser/ui/browser_view_controller.h" | 14 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 15 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_view.h" | 15 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_view.h" |
| 16 #include "ios/chrome/browser/ui/rtl_geometry.h" | 16 #include "ios/chrome/browser/ui/rtl_geometry.h" |
| 17 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" | 17 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" |
| 18 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" | 18 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" |
| 19 #include "ios/chrome/browser/ui/uikit_ui_util.h" | 19 #include "ios/chrome/browser/ui/uikit_ui_util.h" |
| 20 #import "ios/chrome/browser/ui/voice/voice_search_notification_names.h" | 20 #import "ios/chrome/browser/ui/voice/voice_search_notification_names.h" |
| 21 #import "ios/web/public/web_state/crw_web_view_proxy.h" | 21 #import "ios/web/public/web_state/ui/crw_web_view_proxy.h" |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 // This enum is used to record the overscroll actions performed by the user on | 24 // This enum is used to record the overscroll actions performed by the user on |
| 25 // the histogram named |OverscrollActions|. | 25 // the histogram named |OverscrollActions|. |
| 26 enum { | 26 enum { |
| 27 // Records each time the user selects the new tab action. | 27 // Records each time the user selects the new tab action. |
| 28 OVERSCROLL_ACTION_NEW_TAB, | 28 OVERSCROLL_ACTION_NEW_TAB, |
| 29 // Records each time the user selects the refresh action. | 29 // Records each time the user selects the refresh action. |
| 30 OVERSCROLL_ACTION_REFRESH, | 30 OVERSCROLL_ACTION_REFRESH, |
| 31 // Records each time the user selects the close tab action. | 31 // Records each time the user selects the close tab action. |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 overscrollActionsController:self | 902 overscrollActionsController:self |
| 903 didTriggerAction:self.overscrollActionView.selectedAction]; | 903 didTriggerAction:self.overscrollActionView.selectedAction]; |
| 904 } | 904 } |
| 905 | 905 |
| 906 - (void)overscrollActionsView:(OverscrollActionsView*)view | 906 - (void)overscrollActionsView:(OverscrollActionsView*)view |
| 907 selectedActionDidChange:(OverscrollAction)newAction { | 907 selectedActionDidChange:(OverscrollAction)newAction { |
| 908 TriggerHapticFeedbackForSelectionChange(); | 908 TriggerHapticFeedbackForSelectionChange(); |
| 909 } | 909 } |
| 910 | 910 |
| 911 @end | 911 @end |
| OLD | NEW |