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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 2740103006: Implement SmartText selection. (Closed)
Patch Set: Do not invalidate the menu and always recreate it; use Android resource id for Assist Created 3 years, 9 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.assist.AssistStructure.ViewNode; 9 import android.app.assist.AssistStructure.ViewNode;
10 import android.content.ClipData; 10 import android.content.ClipData;
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 if (mNativeContentViewCore == 0) return; 1638 if (mNativeContentViewCore == 0) return;
1639 1639
1640 nativeSendOrientationChangeEvent(mNativeContentViewCore, orientation); 1640 nativeSendOrientationChangeEvent(mNativeContentViewCore, orientation);
1641 } 1641 }
1642 1642
1643 public ActionModeCallbackHelper getActionModeCallbackHelper() { 1643 public ActionModeCallbackHelper getActionModeCallbackHelper() {
1644 return mSelectionPopupController; 1644 return mSelectionPopupController;
1645 } 1645 }
1646 1646
1647 private void showSelectActionMode() { 1647 private void showSelectActionMode() {
1648 if (!mSelectionPopupController.showActionMode()) clearSelection(); 1648 mSelectionPopupController.showActionModeOrClearOnFailure();
1649 } 1649 }
1650 1650
1651 public void clearSelection() { 1651 public void clearSelection() {
1652 mSelectionPopupController.clearSelection(); 1652 mSelectionPopupController.clearSelection();
1653 } 1653 }
1654 1654
1655 /** 1655 /**
1656 * Ensure the selection is preserved the next time the view loses focus. 1656 * Ensure the selection is preserved the next time the view loses focus.
1657 */ 1657 */
1658 public void preserveSelectionOnNextLossOfFocus() { 1658 public void preserveSelectionOnNextLossOfFocus() {
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2673 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l, 2673 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l,
2674 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily, 2674 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily,
2675 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor, 2675 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor,
2676 String textTrackTextShadow, String textTrackTextSize); 2676 String textTrackTextShadow, String textTrackTextSize);
2677 2677
2678 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); 2678 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque);
2679 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo reImpl); 2679 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo reImpl);
2680 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac tion, int x, int y, 2680 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac tion, int x, int y,
2681 int screenX, int screenY, String[] mimeTypes, String content); 2681 int screenX, int screenY, String[] mimeTypes, String content);
2682 } 2682 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698