Chromium Code Reviews| 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.ui.base; | 5 package org.chromium.ui.base; |
| 6 | 6 |
| 7 import android.graphics.Bitmap; | |
| 7 import android.view.View; | 8 import android.view.View; |
| 8 | 9 |
| 9 /** | 10 /** |
| 10 * Interface to acquire and release anchor views from the implementing View. | 11 * Interface to acquire and release anchor views from the implementing View. |
| 11 */ | 12 */ |
| 12 public interface ViewAndroidDelegate { | 13 public interface ViewAndroidDelegate { |
| 13 | 14 |
| 14 /** | 15 /** |
| 15 * @return An anchor view that can be used to anchor decoration views like A utofill popup. | 16 * @return An anchor view that can be used to anchor decoration views like A utofill popup. |
| 16 */ | 17 */ |
| 17 View acquireAnchorView(); | 18 View acquireAnchorView(); |
| 18 | 19 |
| 19 /** | 20 /** |
| 20 * Set the anchor view to specified position and width (all units in dp). | 21 * Set the anchor view to specified position and width (all units in dp). |
| 21 * @param view The anchor view that needs to be positioned. | 22 * @param view The anchor view that needs to be positioned. |
| 22 * @param x X coordinate of the top left corner of the anchor view. | 23 * @param x X coordinate of the top left corner of the anchor view. |
| 23 * @param y Y coordinate of the top left corner of the anchor view. | 24 * @param y Y coordinate of the top left corner of the anchor view. |
| 24 * @param width The width of the anchor view. | 25 * @param width The width of the anchor view. |
| 25 * @param height The height of the anchor view. | 26 * @param height The height of the anchor view. |
| 26 */ | 27 */ |
| 27 void setAnchorViewPosition(View view, float x, float y, float width, float h eight); | 28 void setAnchorViewPosition(View view, float x, float y, float width, float h eight); |
| 28 | 29 |
| 29 /** | 30 /** |
| 30 * Release given anchor view. | 31 * Release given anchor view. |
| 31 * @param anchorView The anchor view that needs to be released. | 32 * @param anchorView The anchor view that needs to be released. |
| 32 */ | 33 */ |
| 33 void releaseAnchorView(View anchorView); | 34 void releaseAnchorView(View anchorView); |
| 35 | |
| 36 /** | |
| 37 * Drag the text out of current view. | |
| 38 * @param text the dragged text. | |
|
Theresa
2016/07/13 22:55:42
nit: capitalize "The" here and a below
hush (inactive)
2016/07/14 18:42:09
Done.
| |
| 39 * @param shadowImage the shadow image for the dragged text. | |
| 40 */ | |
| 41 void startDragAndDrop(String text, Bitmap shadowImage); | |
| 34 } | 42 } |
| OLD | NEW |