OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.webcontents; | 5 package org.chromium.content.browser.webcontents; |
6 | 6 |
7 import android.graphics.Color; | 7 import android.graphics.Color; |
8 import android.os.Bundle; | 8 import android.os.Bundle; |
9 import android.os.Parcel; | 9 import android.os.Parcel; |
10 import android.os.ParcelUuid; | 10 import android.os.ParcelUuid; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 public boolean isIncognito() { | 286 public boolean isIncognito() { |
287 return nativeIsIncognito(mNativeWebContentsAndroid); | 287 return nativeIsIncognito(mNativeWebContentsAndroid); |
288 } | 288 } |
289 | 289 |
290 @Override | 290 @Override |
291 public void resumeLoadingCreatedWebContents() { | 291 public void resumeLoadingCreatedWebContents() { |
292 nativeResumeLoadingCreatedWebContents(mNativeWebContentsAndroid); | 292 nativeResumeLoadingCreatedWebContents(mNativeWebContentsAndroid); |
293 } | 293 } |
294 | 294 |
295 @Override | 295 @Override |
| 296 public void evaluateJavaScript(String script, JavaScriptCallback callback) { |
| 297 nativeEvaluateJavaScript(mNativeWebContentsAndroid, script, callback); |
| 298 } |
| 299 |
| 300 @Override |
296 @VisibleForTesting | 301 @VisibleForTesting |
297 public void evaluateJavaScript(String script, JavaScriptCallback callback) { | 302 public void evaluateJavaScriptForTests(String script, JavaScriptCallback cal
lback) { |
298 nativeEvaluateJavaScript(mNativeWebContentsAndroid, script, callback); | 303 nativeEvaluateJavaScriptForTests(mNativeWebContentsAndroid, script, call
back); |
299 } | 304 } |
300 | 305 |
301 @Override | 306 @Override |
302 public void addMessageToDevToolsConsole(int level, String message) { | 307 public void addMessageToDevToolsConsole(int level, String message) { |
303 nativeAddMessageToDevToolsConsole(mNativeWebContentsAndroid, level, mess
age); | 308 nativeAddMessageToDevToolsConsole(mNativeWebContentsAndroid, level, mess
age); |
304 } | 309 } |
305 | 310 |
306 @Override | 311 @Override |
307 public boolean hasAccessedInitialDocument() { | 312 public boolean hasAccessedInitialDocument() { |
308 return nativeHasAccessedInitialDocument(mNativeWebContentsAndroid); | 313 return nativeHasAccessedInitialDocument(mNativeWebContentsAndroid); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 private native void nativeScrollFocusedEditableNodeIntoView(long nativeWebCo
ntentsAndroid); | 419 private native void nativeScrollFocusedEditableNodeIntoView(long nativeWebCo
ntentsAndroid); |
415 private native void nativeSelectWordAroundCaret(long nativeWebContentsAndroi
d); | 420 private native void nativeSelectWordAroundCaret(long nativeWebContentsAndroi
d); |
416 private native void nativeAdjustSelectionByCharacterOffset( | 421 private native void nativeAdjustSelectionByCharacterOffset( |
417 long nativeWebContentsAndroid, int startAdjust, int endAdjust); | 422 long nativeWebContentsAndroid, int startAdjust, int endAdjust); |
418 private native String nativeGetURL(long nativeWebContentsAndroid); | 423 private native String nativeGetURL(long nativeWebContentsAndroid); |
419 private native String nativeGetLastCommittedURL(long nativeWebContentsAndroi
d); | 424 private native String nativeGetLastCommittedURL(long nativeWebContentsAndroi
d); |
420 private native boolean nativeIsIncognito(long nativeWebContentsAndroid); | 425 private native boolean nativeIsIncognito(long nativeWebContentsAndroid); |
421 private native void nativeResumeLoadingCreatedWebContents(long nativeWebCont
entsAndroid); | 426 private native void nativeResumeLoadingCreatedWebContents(long nativeWebCont
entsAndroid); |
422 private native void nativeEvaluateJavaScript(long nativeWebContentsAndroid, | 427 private native void nativeEvaluateJavaScript(long nativeWebContentsAndroid, |
423 String script, JavaScriptCallback callback); | 428 String script, JavaScriptCallback callback); |
| 429 private native void nativeEvaluateJavaScriptForTests(long nativeWebContentsA
ndroid, |
| 430 String script, JavaScriptCallback callback); |
424 private native void nativeAddMessageToDevToolsConsole( | 431 private native void nativeAddMessageToDevToolsConsole( |
425 long nativeWebContentsAndroid, int level, String message); | 432 long nativeWebContentsAndroid, int level, String message); |
426 private native boolean nativeHasAccessedInitialDocument( | 433 private native boolean nativeHasAccessedInitialDocument( |
427 long nativeWebContentsAndroid); | 434 long nativeWebContentsAndroid); |
428 private native int nativeGetThemeColor(long nativeWebContentsAndroid); | 435 private native int nativeGetThemeColor(long nativeWebContentsAndroid); |
429 private native void nativeRequestAccessibilitySnapshot(long nativeWebContent
sAndroid, | 436 private native void nativeRequestAccessibilitySnapshot(long nativeWebContent
sAndroid, |
430 AccessibilitySnapshotCallback callback, float offsetY, float scrollX
); | 437 AccessibilitySnapshotCallback callback, float offsetY, float scrollX
); |
431 private native void nativeResumeMediaSession(long nativeWebContentsAndroid); | 438 private native void nativeResumeMediaSession(long nativeWebContentsAndroid); |
432 private native void nativeSuspendMediaSession(long nativeWebContentsAndroid)
; | 439 private native void nativeSuspendMediaSession(long nativeWebContentsAndroid)
; |
433 } | 440 } |
OLD | NEW |