| Index: android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
|
| index 2246be3001505b040513befab9e83a2967bc78a5..168ea650dc363f9fb2864854ff82336e1d4c93a3 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
|
| @@ -5,6 +5,7 @@
|
| package org.chromium.android_webview;
|
|
|
| import android.annotation.SuppressLint;
|
| +import android.app.SearchManager;
|
| import android.content.ActivityNotFoundException;
|
| import android.content.Context;
|
| import android.content.Intent;
|
| @@ -189,4 +190,23 @@ public class AwContentViewClient extends ContentViewClient implements ContentVid
|
| public boolean isExternalFlingActive() {
|
| return mAwContents.isFlingActive();
|
| }
|
| +
|
| + @Override
|
| + public boolean doesPerformWebSearch() {
|
| + return true;
|
| + }
|
| +
|
| + @Override
|
| + public void performWebSearch(String query) {
|
| + Intent i = new Intent(Intent.ACTION_WEB_SEARCH);
|
| + i.putExtra(SearchManager.EXTRA_NEW_SEARCH, true);
|
| + i.putExtra(SearchManager.QUERY, query);
|
| + i.putExtra(Browser.EXTRA_APPLICATION_ID, mContext.getPackageName());
|
| + i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
| + try {
|
| + mContext.startActivity(i);
|
| + } catch (android.content.ActivityNotFoundException ex) {
|
| + // If no app handles it, do nothing.
|
| + }
|
| + }
|
| }
|
|
|