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.app.Activity; | 8 import android.app.Activity; |
9 import android.app.SearchManager; | 9 import android.app.SearchManager; |
10 import android.content.ContentResolver; | 10 import android.content.ContentResolver; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 * Called when page scale has been changed, so the controls can update t
heir state. | 203 * Called when page scale has been changed, so the controls can update t
heir state. |
204 */ | 204 */ |
205 void updateZoomControls(); | 205 void updateZoomControls(); |
206 } | 206 } |
207 | 207 |
208 /** | 208 /** |
209 * An interface that allows the embedder to be notified when the results of | 209 * An interface that allows the embedder to be notified when the results of |
210 * extractSmartClipData are available. | 210 * extractSmartClipData are available. |
211 */ | 211 */ |
212 public interface SmartClipDataListener { | 212 public interface SmartClipDataListener { |
213 public void onSmartClipDataExtracted(String result); | 213 public void onSmartClipDataExtracted(String result, Rect cliprect); |
214 } | 214 } |
215 | 215 |
216 /** | 216 /** |
217 * An interface that allows the embedder to be notified of navigation transi
tion | 217 * An interface that allows the embedder to be notified of navigation transi
tion |
218 * related events and respond to them. | 218 * related events and respond to them. |
219 */ | 219 */ |
220 public interface NavigationTransitionDelegate { | 220 public interface NavigationTransitionDelegate { |
221 /** | 221 /** |
222 * Called when the navigation is deferred immediately after the response
started. | 222 * Called when the navigation is deferred immediately after the response
started. |
223 */ | 223 */ |
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 return new Rect(x, y, right, bottom); | 3026 return new Rect(x, y, right, bottom); |
3027 } | 3027 } |
3028 | 3028 |
3029 public void extractSmartClipData(int x, int y, int width, int height) { | 3029 public void extractSmartClipData(int x, int y, int width, int height) { |
3030 if (mNativeContentViewCore != 0) { | 3030 if (mNativeContentViewCore != 0) { |
3031 nativeExtractSmartClipData(mNativeContentViewCore, x, y, width, heig
ht); | 3031 nativeExtractSmartClipData(mNativeContentViewCore, x, y, width, heig
ht); |
3032 } | 3032 } |
3033 } | 3033 } |
3034 | 3034 |
3035 @CalledByNative | 3035 @CalledByNative |
3036 private void onSmartClipDataExtracted(String result) { | 3036 private void onSmartClipDataExtracted(String result, Rect cliprect) { |
3037 if (mSmartClipDataListener != null ) { | 3037 if (mSmartClipDataListener != null ) { |
3038 mSmartClipDataListener.onSmartClipDataExtracted(result); | 3038 mSmartClipDataListener.onSmartClipDataExtracted(result, cliprect); |
3039 } | 3039 } |
3040 } | 3040 } |
3041 | 3041 |
3042 public void setSmartClipDataListener(SmartClipDataListener listener) { | 3042 public void setSmartClipDataListener(SmartClipDataListener listener) { |
3043 mSmartClipDataListener = listener; | 3043 mSmartClipDataListener = listener; |
3044 } | 3044 } |
3045 | 3045 |
3046 public void setBackgroundOpaque(boolean opaque) { | 3046 public void setBackgroundOpaque(boolean opaque) { |
3047 if (mNativeContentViewCore != 0) { | 3047 if (mNativeContentViewCore != 0) { |
3048 nativeSetBackgroundOpaque(mNativeContentViewCore, opaque); | 3048 nativeSetBackgroundOpaque(mNativeContentViewCore, opaque); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3292 | 3292 |
3293 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3293 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3294 int x, int y, int w, int h); | 3294 int x, int y, int w, int h); |
3295 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3295 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3296 | 3296 |
3297 private native void nativeResumeResponseDeferredAtStart( | 3297 private native void nativeResumeResponseDeferredAtStart( |
3298 long nativeContentViewCoreImpl); | 3298 long nativeContentViewCoreImpl); |
3299 private native void nativeSetHasPendingNavigationTransitionForTesting( | 3299 private native void nativeSetHasPendingNavigationTransitionForTesting( |
3300 long nativeContentViewCoreImpl); | 3300 long nativeContentViewCoreImpl); |
3301 } | 3301 } |
OLD | NEW |