Chromium Code Reviews| 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.content.browser; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.app.SearchManager; | 9 import android.app.SearchManager; |
| 10 import android.content.ClipboardManager; | 10 import android.content.ClipboardManager; |
| (...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1902 } | 1902 } |
| 1903 | 1903 |
| 1904 /** | 1904 /** |
| 1905 * @return Whether the page has an active, touch-controlled selection region . | 1905 * @return Whether the page has an active, touch-controlled selection region . |
| 1906 */ | 1906 */ |
| 1907 @VisibleForTesting | 1907 @VisibleForTesting |
| 1908 public boolean hasSelection() { | 1908 public boolean hasSelection() { |
| 1909 return mHasSelection; | 1909 return mHasSelection; |
| 1910 } | 1910 } |
| 1911 | 1911 |
| 1912 /** | |
| 1913 * @return Whether the page has an active, touch-controlled insertion handle . | |
| 1914 */ | |
| 1915 @VisibleForTesting | |
| 1916 public boolean hasInsertion() { | |
|
aurimas (slooooooooow)
2014/10/17 21:56:22
The test is in the same package so you can change
| |
| 1917 return mHasInsertion; | |
| 1918 } | |
| 1919 | |
| 1912 private void hidePastePopup() { | 1920 private void hidePastePopup() { |
| 1913 if (mPastePopupMenu == null) return; | 1921 if (mPastePopupMenu == null) return; |
| 1914 mPastePopupMenu.hide(); | 1922 mPastePopupMenu.hide(); |
| 1915 } | 1923 } |
| 1916 | 1924 |
| 1917 @CalledByNative | 1925 @CalledByNative |
| 1918 private void onSelectionEvent(int eventType, float posXDip, float posYDip) { | 1926 private void onSelectionEvent(int eventType, float posXDip, float posYDip) { |
| 1919 switch (eventType) { | 1927 switch (eventType) { |
| 1920 case SelectionEventType.SELECTION_SHOWN: | 1928 case SelectionEventType.SELECTION_SHOWN: |
| 1921 mHasSelection = true; | 1929 mHasSelection = true; |
| (...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2935 private native void nativeWasResized(long nativeContentViewCoreImpl); | 2943 private native void nativeWasResized(long nativeContentViewCoreImpl); |
| 2936 | 2944 |
| 2937 private native void nativeSetAccessibilityEnabled( | 2945 private native void nativeSetAccessibilityEnabled( |
| 2938 long nativeContentViewCoreImpl, boolean enabled); | 2946 long nativeContentViewCoreImpl, boolean enabled); |
| 2939 | 2947 |
| 2940 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, | 2948 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, |
| 2941 int x, int y, int w, int h); | 2949 int x, int y, int w, int h); |
| 2942 | 2950 |
| 2943 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); | 2951 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); |
| 2944 } | 2952 } |
| OLD | NEW |