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

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

Issue 2578093003: ContentViewCore.showActionMode()'s allowFallback param always true (Closed)
Patch Set: fixed comment Created 4 years 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 | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | 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 9c490279d5e91417e6f40ccc2d2e07efd67872ec..95f040f70783c4edc515c9d44ce5dfabded12837 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
@@ -192,12 +192,10 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
* Show (activate) android action mode by starting it.
*
* <p>Action mode in floating mode is tried first, and then falls back to
- * a normal one if allowed.
- * @param allowFallback A flag indicating if we allow for falling back to
- * normal action mode in case floating action mode creation fails.
+ * a normal one.
* @return {@code true} if the action mode started successfully or is already on.
*/
- public boolean showActionMode(boolean allowFallback) {
+ public boolean showActionMode() {
if (isEmpty()) return false;
// Just refreshes the view if it is already showing.
@@ -211,7 +209,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
if (mView.getParent() != null) {
assert mWebContents != null;
if (supportsFloatingActionMode()) actionMode = startFloatingActionMode();
- if (actionMode == null && allowFallback) actionMode = mView.startActionMode(mCallback);
+ if (actionMode == null) actionMode = mView.startActionMode(mCallback);
}
if (actionMode != null) {
// This is to work around an LGE email issue. See crbug.com/651706 for more details.
@@ -764,7 +762,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
void restoreSelectionPopupsIfNecessary() {
if (mHasSelection && !isActionModeValid()) {
- if (!showActionMode(true)) clearSelection();
+ if (!showActionMode()) clearSelection();
}
}
@@ -781,7 +779,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
mSelectionRect.set(left, top, right, bottom);
mHasSelection = true;
mUnselectAllOnDismiss = true;
- if (!showActionMode(true)) clearSelection();
+ if (!showActionMode()) clearSelection();
break;
case SelectionEventType.SELECTION_HANDLES_MOVED:
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698