| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.support.annotation.IntDef; | 7 import android.support.annotation.IntDef; |
| 8 import android.text.TextUtils; | 8 import android.text.TextUtils; |
| 9 | 9 |
| 10 import org.chromium.base.annotations.CalledByNative; | 10 import org.chromium.base.annotations.CalledByNative; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 @Override | 105 @Override |
| 106 public void showUnhandledTapUIIfNeeded(int x, int y) {} | 106 public void showUnhandledTapUIIfNeeded(int x, int y) {} |
| 107 | 107 |
| 108 @Override | 108 @Override |
| 109 public boolean sendsSelectionPopupUpdates() { | 109 public boolean sendsSelectionPopupUpdates() { |
| 110 return true; | 110 return true; |
| 111 } | 111 } |
| 112 | 112 |
| 113 @Override |
| 114 public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int
endAdjust) {} |
| 115 |
| 113 private void cancelAllRequests() { | 116 private void cancelAllRequests() { |
| 114 if (mNativeContextSelectionClient != 0) { | 117 if (mNativeContextSelectionClient != 0) { |
| 115 nativeCancelAllRequests(mNativeContextSelectionClient); | 118 nativeCancelAllRequests(mNativeContextSelectionClient); |
| 116 } | 119 } |
| 117 | 120 |
| 118 mProvider.cancelAllRequests(); | 121 mProvider.cancelAllRequests(); |
| 119 } | 122 } |
| 120 | 123 |
| 121 private void requestSurroundingText(@RequestType int callbackData) { | 124 private void requestSurroundingText(@RequestType int callbackData) { |
| 122 if (mNativeContextSelectionClient == 0) { | 125 if (mNativeContextSelectionClient == 0) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 148 assert false : "Unexpected callback data"; | 151 assert false : "Unexpected callback data"; |
| 149 break; | 152 break; |
| 150 } | 153 } |
| 151 } | 154 } |
| 152 | 155 |
| 153 private native long nativeInit(WebContents webContents); | 156 private native long nativeInit(WebContents webContents); |
| 154 private native void nativeRequestSurroundingText( | 157 private native void nativeRequestSurroundingText( |
| 155 long nativeContextSelectionClient, int numExtraCharacters, int callb
ackData); | 158 long nativeContextSelectionClient, int numExtraCharacters, int callb
ackData); |
| 156 private native void nativeCancelAllRequests(long nativeContextSelectionClien
t); | 159 private native void nativeCancelAllRequests(long nativeContextSelectionClien
t); |
| 157 } | 160 } |
| OLD | NEW |