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

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

Issue 260623004: Fix to remove customised String over IPC for SmartClip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes done according to review comments Created 6 years, 7 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.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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 * Called when page scale has been changed, so the controls can update t heir state. 199 * Called when page scale has been changed, so the controls can update t heir state.
200 */ 200 */
201 void updateZoomControls(); 201 void updateZoomControls();
202 } 202 }
203 203
204 /** 204 /**
205 * An interface that allows the embedder to be notified when the results of 205 * An interface that allows the embedder to be notified when the results of
206 * extractSmartClipData are available. 206 * extractSmartClipData are available.
207 */ 207 */
208 public interface SmartClipDataListener { 208 public interface SmartClipDataListener {
209 public void onSmartClipDataExtracted(String result); 209 public void onSmartClipDataExtracted(String result, Rect cliprect);
210 } 210 }
211 211
212 private final Context mContext; 212 private final Context mContext;
213 private ViewGroup mContainerView; 213 private ViewGroup mContainerView;
214 private InternalAccessDelegate mContainerViewInternals; 214 private InternalAccessDelegate mContainerViewInternals;
215 private WebContents mWebContents; 215 private WebContents mWebContents;
216 private WebContentsObserverAndroid mWebContentsObserver; 216 private WebContentsObserverAndroid mWebContentsObserver;
217 217
218 private ContentViewClient mContentViewClient; 218 private ContentViewClient mContentViewClient;
219 219
(...skipping 2795 matching lines...) Expand 10 before | Expand all | Expand 10 after
3015 return new Rect(x, y, right, bottom); 3015 return new Rect(x, y, right, bottom);
3016 } 3016 }
3017 3017
3018 public void extractSmartClipData(int x, int y, int width, int height) { 3018 public void extractSmartClipData(int x, int y, int width, int height) {
3019 if (mNativeContentViewCore != 0) { 3019 if (mNativeContentViewCore != 0) {
3020 nativeExtractSmartClipData(mNativeContentViewCore, x, y, width, heig ht); 3020 nativeExtractSmartClipData(mNativeContentViewCore, x, y, width, heig ht);
3021 } 3021 }
3022 } 3022 }
3023 3023
3024 @CalledByNative 3024 @CalledByNative
3025 private void onSmartClipDataExtracted(String result) { 3025 private void onSmartClipDataExtracted(String result, Rect cliprect) {
3026 if (mSmartClipDataListener != null ) { 3026 if (mSmartClipDataListener != null ) {
3027 mSmartClipDataListener.onSmartClipDataExtracted(result); 3027 mSmartClipDataListener.onSmartClipDataExtracted(result, cliprect);
3028 } 3028 }
3029 } 3029 }
3030 3030
3031 public void setSmartClipDataListener(SmartClipDataListener listener) { 3031 public void setSmartClipDataListener(SmartClipDataListener listener) {
3032 mSmartClipDataListener = listener; 3032 mSmartClipDataListener = listener;
3033 } 3033 }
3034 3034
3035 /** 3035 /**
3036 * Offer a long press gesture to the embedding View, primarily for WebView c ompatibility. 3036 * Offer a long press gesture to the embedding View, primarily for WebView c ompatibility.
3037 * 3037 *
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
3233 boolean enableHiding, boolean enableShowing, boolean animate); 3233 boolean enableHiding, boolean enableShowing, boolean animate);
3234 3234
3235 private native void nativeShowImeIfNeeded(long nativeContentViewCoreImpl); 3235 private native void nativeShowImeIfNeeded(long nativeContentViewCoreImpl);
3236 3236
3237 private native void nativeSetAccessibilityEnabled( 3237 private native void nativeSetAccessibilityEnabled(
3238 long nativeContentViewCoreImpl, boolean enabled); 3238 long nativeContentViewCoreImpl, boolean enabled);
3239 3239
3240 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3240 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3241 int x, int y, int w, int h); 3241 int x, int y, int w, int h);
3242 } 3242 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698