| 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.assist.AssistStructure.ViewNode; | 9 import android.app.assist.AssistStructure.ViewNode; |
| 10 import android.content.ClipData; | 10 import android.content.ClipData; |
| (...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 } | 1628 } |
| 1629 | 1629 |
| 1630 hidePopupsAndClearSelection(); | 1630 hidePopupsAndClearSelection(); |
| 1631 assert mNativeSelectPopupSourceFrame == 0 : "Zombie popup did not clear
the frame source"; | 1631 assert mNativeSelectPopupSourceFrame == 0 : "Zombie popup did not clear
the frame source"; |
| 1632 | 1632 |
| 1633 assert items.length == enabled.length; | 1633 assert items.length == enabled.length; |
| 1634 List<SelectPopupItem> popupItems = new ArrayList<SelectPopupItem>(); | 1634 List<SelectPopupItem> popupItems = new ArrayList<SelectPopupItem>(); |
| 1635 for (int i = 0; i < items.length; i++) { | 1635 for (int i = 0; i < items.length; i++) { |
| 1636 popupItems.add(new SelectPopupItem(items[i], enabled[i])); | 1636 popupItems.add(new SelectPopupItem(items[i], enabled[i])); |
| 1637 } | 1637 } |
| 1638 if (DeviceFormFactor.isTablet(mContext) && !multiple && !isTouchExplorat
ionEnabled()) { | 1638 if (DeviceFormFactor.isTablet() && !multiple && !isTouchExplorationEnabl
ed()) { |
| 1639 mSelectPopup = new SelectPopupDropdown( | 1639 mSelectPopup = new SelectPopupDropdown( |
| 1640 this, anchorView, popupItems, selectedIndices, rightAligned)
; | 1640 this, anchorView, popupItems, selectedIndices, rightAligned)
; |
| 1641 } else { | 1641 } else { |
| 1642 if (getWindowAndroid() == null) return; | 1642 if (getWindowAndroid() == null) return; |
| 1643 Context windowContext = getWindowAndroid().getContext().get(); | 1643 Context windowContext = getWindowAndroid().getContext().get(); |
| 1644 if (windowContext == null) return; | 1644 if (windowContext == null) return; |
| 1645 mSelectPopup = new SelectPopupDialog( | 1645 mSelectPopup = new SelectPopupDialog( |
| 1646 this, windowContext, popupItems, multiple, selectedIndices); | 1646 this, windowContext, popupItems, multiple, selectedIndices); |
| 1647 } | 1647 } |
| 1648 mNativeSelectPopupSourceFrame = nativeSelectPopupSourceFrame; | 1648 mNativeSelectPopupSourceFrame = nativeSelectPopupSourceFrame; |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2422 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, | 2422 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, |
| 2423 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, | 2423 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, |
| 2424 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, | 2424 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, |
| 2425 String textTrackTextShadow, String textTrackTextSize); | 2425 String textTrackTextShadow, String textTrackTextSize); |
| 2426 | 2426 |
| 2427 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 2427 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
| 2428 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); | 2428 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); |
| 2429 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, | 2429 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, |
| 2430 int screenX, int screenY, String[] mimeTypes, String content); | 2430 int screenX, int screenY, String[] mimeTypes, String content); |
| 2431 } | 2431 } |
| OLD | NEW |