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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java

Issue 2703643004: [TTS] Add an ACK message to SelectWordAroundCaret. (Closed)
Patch Set: Just fixed a typo in a comment. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.chrome.browser.contextualsearch; 5 package org.chromium.chrome.browser.contextualsearch;
6 6
7 import android.text.TextUtils; 7 import android.text.TextUtils;
8 import android.view.View; 8 import android.view.View;
9 import android.view.ViewGroup; 9 import android.view.ViewGroup;
10 import android.view.ViewTreeObserver; 10 import android.view.ViewTreeObserver;
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 } 1238 }
1239 1239
1240 @Override 1240 @Override
1241 public void showUnhandledTapUIIfNeeded(final int x, final int y) { 1241 public void showUnhandledTapUIIfNeeded(final int x, final int y) {
1242 mDidBasePageLoadJustStart = false; 1242 mDidBasePageLoadJustStart = false;
1243 if (!isOverlayVideoMode()) { 1243 if (!isOverlayVideoMode()) {
1244 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y); 1244 mSelectionController.handleShowUnhandledTapUIIfNeeded(x, y);
1245 } 1245 }
1246 } 1246 }
1247 1247
1248 @Override
1249 public void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) {
1250 if (!isOverlayVideoMode()) {
1251 mSelectionController.selectWordAroundCaretAck(didSelect, startAdjust , endAdjust);
1252 }
1253 }
1254
1248 private boolean isOverlayVideoMode() { 1255 private boolean isOverlayVideoMode() {
1249 return mActivity.getFullscreenManager() != null 1256 return mActivity.getFullscreenManager() != null
1250 && mActivity.getFullscreenManager().isOverlayVideoMode(); 1257 && mActivity.getFullscreenManager().isOverlayVideoMode();
1251 } 1258 }
1252 1259
1253 // ========================================================================= =================== 1260 // ========================================================================= ===================
1254 // Selection 1261 // Selection
1255 // ========================================================================= =================== 1262 // ========================================================================= ===================
1256 1263
1257 /** 1264 /**
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 boolean maySendBasePageUrl); 1452 boolean maySendBasePageUrl);
1446 protected native void nativeGatherSurroundingText(long nativeContextualSearc hManager, 1453 protected native void nativeGatherSurroundingText(long nativeContextualSearc hManager,
1447 String selection, String homeCountry, WebContents baseWebContents, 1454 String selection, String homeCountry, WebContents baseWebContents,
1448 boolean maySendBasePageUrl); 1455 boolean maySendBasePageUrl);
1449 private native void nativeEnableContextualSearchJsApiForOverlay( 1456 private native void nativeEnableContextualSearchJsApiForOverlay(
1450 long nativeContextualSearchManager, WebContents overlayWebContents); 1457 long nativeContextualSearchManager, WebContents overlayWebContents);
1451 // Don't call these directly, instead call the private methods that cache th e results. 1458 // Don't call these directly, instead call the private methods that cache th e results.
1452 private native String nativeGetTargetLanguage(long nativeContextualSearchMan ager); 1459 private native String nativeGetTargetLanguage(long nativeContextualSearchMan ager);
1453 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa nager); 1460 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa nager);
1454 } 1461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698