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.ContentResolver; | 10 import android.content.ContentResolver; |
(...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 } | 2080 } |
2081 | 2081 |
2082 @Override | 2082 @Override |
2083 public boolean isSelectionEditable() { | 2083 public boolean isSelectionEditable() { |
2084 return mSelectionEditable; | 2084 return mSelectionEditable; |
2085 } | 2085 } |
2086 | 2086 |
2087 @Override | 2087 @Override |
2088 public void onDestroyActionMode() { | 2088 public void onDestroyActionMode() { |
2089 mActionMode = null; | 2089 mActionMode = null; |
2090 if (mUnselectAllOnActionModeDismiss) mImeAdapter.unselect(); | 2090 if (mUnselectAllOnActionModeDismiss) { |
| 2091 if (isSelectionEditable()) { |
| 2092 int selectionEnd = Selection.getSelectionEnd(mEditable); |
| 2093 mInputConnection.setSelection(selectionEnd, selectionEnd
); |
| 2094 } else { |
| 2095 mImeAdapter.unselect(); |
| 2096 } |
| 2097 } |
2091 getContentViewClient().onContextualActionBarHidden(); | 2098 getContentViewClient().onContextualActionBarHidden(); |
2092 } | 2099 } |
2093 | 2100 |
2094 @Override | 2101 @Override |
2095 public boolean isShareAvailable() { | 2102 public boolean isShareAvailable() { |
2096 Intent intent = new Intent(Intent.ACTION_SEND); | 2103 Intent intent = new Intent(Intent.ACTION_SEND); |
2097 intent.setType("text/plain"); | 2104 intent.setType("text/plain"); |
2098 return getContext().getPackageManager().queryIntentActivities(in
tent, | 2105 return getContext().getPackageManager().queryIntentActivities(in
tent, |
2099 PackageManager.MATCH_DEFAULT_ONLY).size() > 0; | 2106 PackageManager.MATCH_DEFAULT_ONLY).size() > 0; |
2100 } | 2107 } |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3239 | 3246 |
3240 private native void nativeShowImeIfNeeded(long nativeContentViewCoreImpl); | 3247 private native void nativeShowImeIfNeeded(long nativeContentViewCoreImpl); |
3241 | 3248 |
3242 private native void nativeSetAccessibilityEnabled( | 3249 private native void nativeSetAccessibilityEnabled( |
3243 long nativeContentViewCoreImpl, boolean enabled); | 3250 long nativeContentViewCoreImpl, boolean enabled); |
3244 | 3251 |
3245 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3252 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3246 int x, int y, int w, int h); | 3253 int x, int y, int w, int h); |
3247 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3254 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3248 } | 3255 } |
OLD | NEW |