| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.ui.base; | 5 package org.chromium.ui.base; |
| 6 | 6 |
| 7 import android.animation.Animator; | 7 import android.animation.Animator; |
| 8 import android.animation.AnimatorListenerAdapter; | 8 import android.animation.AnimatorListenerAdapter; |
| 9 import android.annotation.SuppressLint; | 9 import android.annotation.SuppressLint; |
| 10 import android.annotation.TargetApi; | 10 import android.annotation.TargetApi; |
| 11 import android.app.Activity; | 11 import android.app.Activity; |
| 12 import android.app.PendingIntent; | 12 import android.app.PendingIntent; |
| 13 import android.content.ContentResolver; | 13 import android.content.ContentResolver; |
| 14 import android.content.Context; | 14 import android.content.Context; |
| 15 import android.content.ContextWrapper; | 15 import android.content.ContextWrapper; |
| 16 import android.content.Intent; | 16 import android.content.Intent; |
| 17 import android.content.pm.PackageManager; | 17 import android.content.pm.PackageManager; |
| 18 import android.graphics.Bitmap; | |
| 19 import android.os.Build; | 18 import android.os.Build; |
| 20 import android.os.Bundle; | 19 import android.os.Bundle; |
| 21 import android.os.Process; | 20 import android.os.Process; |
| 22 import android.util.Log; | 21 import android.util.Log; |
| 23 import android.util.SparseArray; | 22 import android.util.SparseArray; |
| 24 import android.view.View; | 23 import android.view.View; |
| 25 import android.view.ViewGroup; | 24 import android.view.ViewGroup; |
| 26 import android.view.accessibility.AccessibilityManager; | 25 import android.view.accessibility.AccessibilityManager; |
| 27 | 26 |
| 28 import org.chromium.base.Callback; | 27 import org.chromium.base.Callback; |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 * setWillNotDraw(false) to ensure that the animation is drawn over the Surf
aceView, | 644 * setWillNotDraw(false) to ensure that the animation is drawn over the Surf
aceView, |
| 646 * and otherwise we call setWillNotDraw(true). | 645 * and otherwise we call setWillNotDraw(true). |
| 647 */ | 646 */ |
| 648 private void refreshWillNotDraw() { | 647 private void refreshWillNotDraw() { |
| 649 boolean willNotDraw = !mIsTouchExplorationEnabled && mAnimationsOverCont
ent.isEmpty(); | 648 boolean willNotDraw = !mIsTouchExplorationEnabled && mAnimationsOverCont
ent.isEmpty(); |
| 650 if (mAnimationPlaceholderView.willNotDraw() != willNotDraw) { | 649 if (mAnimationPlaceholderView.willNotDraw() != willNotDraw) { |
| 651 mAnimationPlaceholderView.setWillNotDraw(willNotDraw); | 650 mAnimationPlaceholderView.setWillNotDraw(willNotDraw); |
| 652 } | 651 } |
| 653 } | 652 } |
| 654 | 653 |
| 655 /** | |
| 656 * Starts drag and drop operation on a ViewAndroid whose delegate is viewAnd
roidDelegate. | |
| 657 */ | |
| 658 @CalledByNative | |
| 659 private void startDragAndDrop( | |
| 660 ViewAndroidDelegate viewAndroidDelegate, String text, Bitmap shadowI
mage) { | |
| 661 viewAndroidDelegate.startDragAndDrop(text, shadowImage); | |
| 662 } | |
| 663 | |
| 664 private native long nativeInit(); | 654 private native long nativeInit(); |
| 665 private native void nativeOnVSync(long nativeWindowAndroid, | 655 private native void nativeOnVSync(long nativeWindowAndroid, |
| 666 long vsyncTimeMicros, | 656 long vsyncTimeMicros, |
| 667 long vsyncPeriodMicros); | 657 long vsyncPeriodMicros); |
| 668 private native void nativeOnVisibilityChanged(long nativeWindowAndroid, bool
ean visible); | 658 private native void nativeOnVisibilityChanged(long nativeWindowAndroid, bool
ean visible); |
| 669 private native void nativeOnActivityStopped(long nativeWindowAndroid); | 659 private native void nativeOnActivityStopped(long nativeWindowAndroid); |
| 670 private native void nativeOnActivityStarted(long nativeWindowAndroid); | 660 private native void nativeOnActivityStarted(long nativeWindowAndroid); |
| 671 private native void nativeDestroy(long nativeWindowAndroid); | 661 private native void nativeDestroy(long nativeWindowAndroid); |
| 672 | 662 |
| 673 } | 663 } |
| OLD | NEW |