| OLD | NEW |
| 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.Activity; | 9 import android.app.Activity; |
| 10 import android.app.SearchManager; | 10 import android.app.SearchManager; |
| (...skipping 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2629 } | 2629 } |
| 2630 | 2630 |
| 2631 @VisibleForTesting | 2631 @VisibleForTesting |
| 2632 public boolean isPastePopupShowing() { | 2632 public boolean isPastePopupShowing() { |
| 2633 if (mPastePopupMenu != null) return mPastePopupMenu.isShowing(); | 2633 if (mPastePopupMenu != null) return mPastePopupMenu.isShowing(); |
| 2634 return false; | 2634 return false; |
| 2635 } | 2635 } |
| 2636 | 2636 |
| 2637 private boolean showPastePopup(int x, int y) { | 2637 private boolean showPastePopup(int x, int y) { |
| 2638 if (!mHasInsertion || !canPaste()) return false; | 2638 if (!mHasInsertion || !canPaste()) return false; |
| 2639 // TODO(jdduke): Factor out all selection/paste-related logic from Conte
ntViewCore. | |
| 2640 final float contentOffsetYPix = mRenderCoordinates.getContentOffsetYPix(
); | 2639 final float contentOffsetYPix = mRenderCoordinates.getContentOffsetYPix(
); |
| 2641 getPastePopup().show(x, (int) (y + contentOffsetYPix)); | 2640 getPastePopup().show(x, (int) (y + contentOffsetYPix)); |
| 2642 return true; | 2641 return true; |
| 2643 } | 2642 } |
| 2644 | 2643 |
| 2645 private void hidePastePopup() { | 2644 private void hidePastePopup() { |
| 2646 if (mPastePopupMenu != null) mPastePopupMenu.hide(); | 2645 if (mPastePopupMenu != null) mPastePopupMenu.hide(); |
| 2647 } | 2646 } |
| 2648 | 2647 |
| 2649 private PastePopupMenu getPastePopup() { | 2648 private PastePopupMenu getPastePopup() { |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3353 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, | 3352 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, |
| 3354 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, | 3353 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, |
| 3355 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, | 3354 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, |
| 3356 String textTrackTextShadow, String textTrackTextSize); | 3355 String textTrackTextShadow, String textTrackTextSize); |
| 3357 | 3356 |
| 3358 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3357 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
| 3359 int x, int y, int w, int h); | 3358 int x, int y, int w, int h); |
| 3360 | 3359 |
| 3361 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3360 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
| 3362 } | 3361 } |
| OLD | NEW |