Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(930)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java

Issue 2904033002: Use hasSelection() instead of mHasSelection (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698