Index: content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java b/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java |
index 23bd15a8aea305ae7cfd523b9e917372fc3f4445..d72b18e07e2c8c5238884c7385fa6546431f1942 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java |
@@ -233,7 +233,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
public void showActionModeOrClearOnFailure() { |
mPendingShowActionMode = false; |
- if (!isActionModeSupported() || !mHasSelection) return; |
+ if (!isActionModeSupported() || !hasSelection()) return; |
// Just refresh the view if action mode already exists. |
if (isActionModeValid()) { |
@@ -909,7 +909,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
if (mWebContents == null || resultCode != Activity.RESULT_OK || data == null) return; |
// Do not handle the result if no text is selected or current selection is not editable. |
- if (!mHasSelection || !isSelectionEditable()) return; |
+ if (!hasSelection() || !isSelectionEditable()) return; |
CharSequence result = data.getCharSequenceExtra(Intent.EXTRA_PROCESS_TEXT); |
if (result != null) { |
@@ -920,7 +920,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
} |
void restoreSelectionPopupsIfNecessary() { |
- if (mHasSelection && !isActionModeValid()) { |
+ if (hasSelection() && !isActionModeValid()) { |
showActionModeOrClearOnFailure(); |
} |
} |
@@ -1100,7 +1100,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
@Override |
public String getSelectedText() { |
- return mHasSelection ? mLastSelectedText : ""; |
+ return hasSelection() ? mLastSelectedText : ""; |
} |
private boolean isShareAvailable() { |
@@ -1141,7 +1141,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
@Override |
public void onClassified(SmartSelectionProvider.Result result) { |
// If the selection does not exist any more, discard |result|. |
- if (!mHasSelection) { |
+ if (!hasSelection()) { |
assert !mHidden; |
assert mClassificationResult == null; |
mPendingShowActionMode = false; |