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.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
9 import android.app.assist.AssistStructure.ViewNode; | 9 import android.app.assist.AssistStructure.ViewNode; |
10 import android.content.ClipData; | 10 import android.content.ClipData; |
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1776 mSelectionPopupController.onSelectionChanged(text); | 1776 mSelectionPopupController.onSelectionChanged(text); |
1777 } | 1777 } |
1778 | 1778 |
1779 @SuppressWarnings("unused") | 1779 @SuppressWarnings("unused") |
1780 @CalledByNative | 1780 @CalledByNative |
1781 private void performLongPressHapticFeedback() { | 1781 private void performLongPressHapticFeedback() { |
1782 mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
; | 1782 mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
; |
1783 } | 1783 } |
1784 | 1784 |
1785 @CalledByNative | 1785 @CalledByNative |
1786 private void showPastePopup(int x, int y, boolean canSelectAll) { | 1786 private void showSelectionMenu(int xAnchor, int yAnchor, int left, int top,
int right, |
1787 mSelectionPopupController.createAndShowPastePopup(x, y, canSelectAll); | 1787 int bottom, boolean isEditable, boolean isPasswordType, String selec
tionText, |
| 1788 boolean canSelectAll) { |
| 1789 mSelectionPopupController.showSelectionMenu(xAnchor, yAnchor, left, top,
right, bottom, |
| 1790 isEditable, isPasswordType, selectionText, canSelectAll); |
1788 } | 1791 } |
1789 | 1792 |
1790 private void destroyPastePopup() { | 1793 private void destroyPastePopup() { |
1791 mSelectionPopupController.destroyPastePopup(); | 1794 mSelectionPopupController.destroyPastePopup(); |
1792 } | 1795 } |
1793 | 1796 |
1794 private boolean canPaste() { | 1797 private boolean canPaste() { |
1795 return ((ClipboardManager) mContext.getSystemService( | 1798 return ((ClipboardManager) mContext.getSystemService( |
1796 Context.CLIPBOARD_SERVICE)).hasPrimaryClip(); | 1799 Context.CLIPBOARD_SERVICE)).hasPrimaryClip(); |
1797 } | 1800 } |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, | 2514 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, |
2512 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, | 2515 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, |
2513 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, | 2516 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, |
2514 String textTrackTextShadow, String textTrackTextSize); | 2517 String textTrackTextShadow, String textTrackTextSize); |
2515 | 2518 |
2516 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 2519 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
2517 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); | 2520 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); |
2518 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, | 2521 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, |
2519 int screenX, int screenY, String[] mimeTypes, String content); | 2522 int screenX, int screenY, String[] mimeTypes, String content); |
2520 } | 2523 } |
OLD | NEW |