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

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

Issue 2099753003: [TTS] Update Tap counters to compensate for Quick Answers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just added a comment. Created 4 years, 5 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 * is simply informative or descriptive of the answer in the full res ults. 744 * is simply informative or descriptive of the answer in the full res ults.
745 */ 745 */
746 @CalledByNative 746 @CalledByNative
747 private void onSetCaption(String caption, boolean doesAnswer) { 747 private void onSetCaption(String caption, boolean doesAnswer) {
748 // Notify the UI of the caption. 748 // Notify the UI of the caption.
749 mSearchPanel.setCaption(caption); 749 mSearchPanel.setCaption(caption);
750 if (mQuickAnswersHeuristic != null) { 750 if (mQuickAnswersHeuristic != null) {
751 mQuickAnswersHeuristic.setConditionSatisfied(true); 751 mQuickAnswersHeuristic.setConditionSatisfied(true);
752 mQuickAnswersHeuristic.setDoesAnswer(doesAnswer); 752 mQuickAnswersHeuristic.setDoesAnswer(doesAnswer);
753 } 753 }
754
755 // Update Tap counters to account for a possible answer.
756 mPolicy.updateCountersForQuickAnswer(mWasActivatedByTap, doesAnswer);
754 } 757 }
755 758
756 /** 759 /**
757 * Notifies that the Accessibility Mode state has changed. 760 * Notifies that the Accessibility Mode state has changed.
758 * 761 *
759 * @param enabled Whether the Accessibility Mode is enabled. 762 * @param enabled Whether the Accessibility Mode is enabled.
760 */ 763 */
761 public void onAccessibilityModeChanged(boolean enabled) { 764 public void onAccessibilityModeChanged(boolean enabled) {
762 mIsAccessibilityModeEnabled = enabled; 765 mIsAccessibilityModeEnabled = enabled;
763 } 766 }
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 boolean maySendBasePageUrl); 1358 boolean maySendBasePageUrl);
1356 protected native void nativeGatherSurroundingText(long nativeContextualSearc hManager, 1359 protected native void nativeGatherSurroundingText(long nativeContextualSearc hManager,
1357 String selection, boolean useResolvedSearchTerm, ContentViewCore bas eContentViewCore, 1360 String selection, boolean useResolvedSearchTerm, ContentViewCore bas eContentViewCore,
1358 boolean maySendBasePageUrl); 1361 boolean maySendBasePageUrl);
1359 private native void nativeEnableContextualSearchJsApiForOverlay( 1362 private native void nativeEnableContextualSearchJsApiForOverlay(
1360 long nativeContextualSearchManager, ContentViewCore overlayContentVi ewCore); 1363 long nativeContextualSearchManager, ContentViewCore overlayContentVi ewCore);
1361 // Don't call these directly, instead call the private methods that cache th e results. 1364 // Don't call these directly, instead call the private methods that cache th e results.
1362 private native String nativeGetTargetLanguage(long nativeContextualSearchMan ager); 1365 private native String nativeGetTargetLanguage(long nativeContextualSearchMan ager);
1363 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa nager); 1366 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa nager);
1364 } 1367 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698