| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 package org.chromium.chrome.browser.appmenu; | 5 package org.chromium.chrome.browser.appmenu; |
| 6 | 6 |
| 7 import android.animation.TimeAnimator; | 7 import android.animation.TimeAnimator; |
| 8 import android.annotation.SuppressLint; | 8 import android.annotation.SuppressLint; |
| 9 import android.app.Activity; | 9 import android.app.Activity; |
| 10 import android.content.res.Resources; | 10 import android.content.res.Resources; |
| 11 import android.graphics.Rect; | 11 import android.graphics.Rect; |
| 12 import android.view.MotionEvent; | 12 import android.view.MotionEvent; |
| 13 import android.view.View; | 13 import android.view.View; |
| 14 import android.view.ViewConfiguration; | 14 import android.view.ViewConfiguration; |
| 15 import android.widget.ImageButton; | 15 import android.widget.ImageButton; |
| 16 import android.widget.LinearLayout; | 16 import android.widget.LinearLayout; |
| 17 import android.widget.ListPopupWindow; | 17 import android.widget.ListPopupWindow; |
| 18 import android.widget.ListView; | 18 import android.widget.ListView; |
| 19 | 19 |
| 20 import org.chromium.chrome.R; | 20 import org.chromium.chrome.R; |
| 21 import org.chromium.chrome.browser.UmaBridge; | 21 import org.chromium.chrome.browser.metrics.UmaBridge; |
| 22 | 22 |
| 23 import java.util.ArrayList; | 23 import java.util.ArrayList; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Handles the drag touch events on AppMenu that start from the menu button. | 26 * Handles the drag touch events on AppMenu that start from the menu button. |
| 27 * | 27 * |
| 28 * Lint suppression for NewApi is added because we are using TimeAnimator class
that was marked | 28 * Lint suppression for NewApi is added because we are using TimeAnimator class
that was marked |
| 29 * hidden in API 16. | 29 * hidden in API 16. |
| 30 */ | 30 */ |
| 31 @SuppressLint("NewApi") | 31 @SuppressLint("NewApi") |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 */ | 276 */ |
| 277 private Rect getScreenVisibleRect(View view) { | 277 private Rect getScreenVisibleRect(View view) { |
| 278 view.getLocalVisibleRect(mScreenVisibleRect); | 278 view.getLocalVisibleRect(mScreenVisibleRect); |
| 279 view.getLocationOnScreen(mScreenVisiblePoint); | 279 view.getLocationOnScreen(mScreenVisiblePoint); |
| 280 mScreenVisibleRect.offset(mScreenVisiblePoint[0], mScreenVisiblePoint[1]
); | 280 mScreenVisibleRect.offset(mScreenVisiblePoint[0], mScreenVisiblePoint[1]
); |
| 281 return mScreenVisibleRect; | 281 return mScreenVisibleRect; |
| 282 } | 282 } |
| 283 | 283 |
| 284 private static native void nativeRecordAppMenuTouchDuration(long timeMs); | 284 private static native void nativeRecordAppMenuTouchDuration(long timeMs); |
| 285 } | 285 } |
| OLD | NEW |