| OLD | NEW |
| 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.os.Handler; | 8 import android.os.Handler; |
| 9 import android.text.TextUtils; | 9 import android.text.TextUtils; |
| 10 import android.view.View; | 10 import android.view.View; |
| (...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 public void handleMetricsForWouldSuppressTap(ContextualSearchHeuristics tapH
euristics) { | 1267 public void handleMetricsForWouldSuppressTap(ContextualSearchHeuristics tapH
euristics) { |
| 1268 mHeuristics = tapHeuristics; | 1268 mHeuristics = tapHeuristics; |
| 1269 | 1269 |
| 1270 // TODO(donnd): QuickAnswersHeuristic is getting added to TapSuppression
Heuristics and | 1270 // TODO(donnd): QuickAnswersHeuristic is getting added to TapSuppression
Heuristics and |
| 1271 // and getting considered in TapSuppressionHeuristics#shouldSuppressTap(
). It should | 1271 // and getting considered in TapSuppressionHeuristics#shouldSuppressTap(
). It should |
| 1272 // be a part of ContextualSearchHeuristics for logging purposes but not
for suppression. | 1272 // be a part of ContextualSearchHeuristics for logging purposes but not
for suppression. |
| 1273 mQuickAnswersHeuristic = new QuickAnswersHeuristic(); | 1273 mQuickAnswersHeuristic = new QuickAnswersHeuristic(); |
| 1274 mHeuristics.add(mQuickAnswersHeuristic); | 1274 mHeuristics.add(mQuickAnswersHeuristic); |
| 1275 | 1275 |
| 1276 mSearchPanel.getPanelMetrics().setResultsSeenExperiments(mHeuristics); | 1276 mSearchPanel.getPanelMetrics().setResultsSeenExperiments(mHeuristics); |
| 1277 mSearchPanel.getPanelMetrics().setRankerLogExperiments(mHeuristics); | 1277 mSearchPanel.getPanelMetrics().setRankerLogExperiments(mHeuristics, getB
asePageUrl()); |
| 1278 } | 1278 } |
| 1279 | 1279 |
| 1280 @Override | 1280 @Override |
| 1281 public void handleValidTap() { | 1281 public void handleValidTap() { |
| 1282 if (mIsAccessibilityModeEnabled) return; | 1282 if (mIsAccessibilityModeEnabled) return; |
| 1283 | 1283 |
| 1284 mInternalStateController.enter(InternalState.TAP_RECOGNIZED); | 1284 mInternalStateController.enter(InternalState.TAP_RECOGNIZED); |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 /** | 1287 /** |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 private native void nativeStartSearchTermResolutionRequest(long nativeContex
tualSearchManager, | 1569 private native void nativeStartSearchTermResolutionRequest(long nativeContex
tualSearchManager, |
| 1570 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); | 1570 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); |
| 1571 protected native void nativeGatherSurroundingText(long nativeContextualSearc
hManager, | 1571 protected native void nativeGatherSurroundingText(long nativeContextualSearc
hManager, |
| 1572 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); | 1572 ContextualSearchContext contextualSearchContext, WebContents baseWeb
Contents); |
| 1573 private native void nativeEnableContextualSearchJsApiForOverlay( | 1573 private native void nativeEnableContextualSearchJsApiForOverlay( |
| 1574 long nativeContextualSearchManager, WebContents overlayWebContents); | 1574 long nativeContextualSearchManager, WebContents overlayWebContents); |
| 1575 // Don't call these directly, instead call the private methods that cache th
e results. | 1575 // Don't call these directly, instead call the private methods that cache th
e results. |
| 1576 private native String nativeGetTargetLanguage(long nativeContextualSearchMan
ager); | 1576 private native String nativeGetTargetLanguage(long nativeContextualSearchMan
ager); |
| 1577 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa
nager); | 1577 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa
nager); |
| 1578 } | 1578 } |
| OLD | NEW |