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.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.annotation.TargetApi; | 7 import android.annotation.TargetApi; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.app.SearchManager; | 9 import android.app.SearchManager; |
10 import android.content.ClipboardManager; | 10 import android.content.ClipboardManager; |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 void setContextualSearchClient(ContextualSearchClient contextualSearchClient
) { | 862 void setContextualSearchClient(ContextualSearchClient contextualSearchClient
) { |
863 mContextualSearchClient = contextualSearchClient; | 863 mContextualSearchClient = contextualSearchClient; |
864 } | 864 } |
865 | 865 |
866 void onShowUnhandledTapUIIfNeeded(int x, int y) { | 866 void onShowUnhandledTapUIIfNeeded(int x, int y) { |
867 if (mContextualSearchClient != null) { | 867 if (mContextualSearchClient != null) { |
868 mContextualSearchClient.showUnhandledTapUIIfNeeded(x, y); | 868 mContextualSearchClient.showUnhandledTapUIIfNeeded(x, y); |
869 } | 869 } |
870 } | 870 } |
871 | 871 |
| 872 void onSelectWordAroundCaretAck(boolean didSelect, int startAdjust, int endA
djust) { |
| 873 if (mContextualSearchClient != null) { |
| 874 mContextualSearchClient.selectWordAroundCaretAck(didSelect, startAdj
ust, endAdjust); |
| 875 } |
| 876 } |
| 877 |
872 void destroyActionModeAndUnselect() { | 878 void destroyActionModeAndUnselect() { |
873 mUnselectAllOnDismiss = true; | 879 mUnselectAllOnDismiss = true; |
874 finishActionMode(); | 880 finishActionMode(); |
875 } | 881 } |
876 | 882 |
877 void destroyActionModeAndKeepSelection() { | 883 void destroyActionModeAndKeepSelection() { |
878 mUnselectAllOnDismiss = false; | 884 mUnselectAllOnDismiss = false; |
879 finishActionMode(); | 885 finishActionMode(); |
880 } | 886 } |
881 | 887 |
(...skipping 27 matching lines...) Expand all Loading... |
909 mIsInsertion = insertion; | 915 mIsInsertion = insertion; |
910 } | 916 } |
911 | 917 |
912 private boolean isShareAvailable() { | 918 private boolean isShareAvailable() { |
913 Intent intent = new Intent(Intent.ACTION_SEND); | 919 Intent intent = new Intent(Intent.ACTION_SEND); |
914 intent.setType("text/plain"); | 920 intent.setType("text/plain"); |
915 return mContext.getPackageManager().queryIntentActivities(intent, | 921 return mContext.getPackageManager().queryIntentActivities(intent, |
916 PackageManager.MATCH_DEFAULT_ONLY).size() > 0; | 922 PackageManager.MATCH_DEFAULT_ONLY).size() > 0; |
917 } | 923 } |
918 } | 924 } |
OLD | NEW |