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 @VisibleForTesting |
296 public void evaluateJavaScript(String script, JavaScriptCallback callback) { | 297 public void evaluateJavaScript(String script, JavaScriptCallback callback) { |
297 nativeEvaluateJavaScript(mNativeWebContentsAndroid, script, callback); | 298 nativeEvaluateJavaScript(mNativeWebContentsAndroid, script, callback); |
298 } | 299 } |
299 | 300 |
300 @Override | 301 @Override |
301 @VisibleForTesting | |
302 public void evaluateJavaScriptForTests(String script, JavaScriptCallback cal
lback) { | |
303 nativeEvaluateJavaScriptForTests(mNativeWebContentsAndroid, script, call
back); | |
304 } | |
305 | |
306 @Override | |
307 public void addMessageToDevToolsConsole(int level, String message) { | 302 public void addMessageToDevToolsConsole(int level, String message) { |
308 nativeAddMessageToDevToolsConsole(mNativeWebContentsAndroid, level, mess
age); | 303 nativeAddMessageToDevToolsConsole(mNativeWebContentsAndroid, level, mess
age); |
309 } | 304 } |
310 | 305 |
311 @Override | 306 @Override |
312 public boolean hasAccessedInitialDocument() { | 307 public boolean hasAccessedInitialDocument() { |
313 return nativeHasAccessedInitialDocument(mNativeWebContentsAndroid); | 308 return nativeHasAccessedInitialDocument(mNativeWebContentsAndroid); |
314 } | 309 } |
315 | 310 |
316 @CalledByNative | 311 @CalledByNative |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 private native void nativeScrollFocusedEditableNodeIntoView(long nativeWebCo
ntentsAndroid); | 414 private native void nativeScrollFocusedEditableNodeIntoView(long nativeWebCo
ntentsAndroid); |
420 private native void nativeSelectWordAroundCaret(long nativeWebContentsAndroi
d); | 415 private native void nativeSelectWordAroundCaret(long nativeWebContentsAndroi
d); |
421 private native void nativeAdjustSelectionByCharacterOffset( | 416 private native void nativeAdjustSelectionByCharacterOffset( |
422 long nativeWebContentsAndroid, int startAdjust, int endAdjust); | 417 long nativeWebContentsAndroid, int startAdjust, int endAdjust); |
423 private native String nativeGetURL(long nativeWebContentsAndroid); | 418 private native String nativeGetURL(long nativeWebContentsAndroid); |
424 private native String nativeGetLastCommittedURL(long nativeWebContentsAndroi
d); | 419 private native String nativeGetLastCommittedURL(long nativeWebContentsAndroi
d); |
425 private native boolean nativeIsIncognito(long nativeWebContentsAndroid); | 420 private native boolean nativeIsIncognito(long nativeWebContentsAndroid); |
426 private native void nativeResumeLoadingCreatedWebContents(long nativeWebCont
entsAndroid); | 421 private native void nativeResumeLoadingCreatedWebContents(long nativeWebCont
entsAndroid); |
427 private native void nativeEvaluateJavaScript(long nativeWebContentsAndroid, | 422 private native void nativeEvaluateJavaScript(long nativeWebContentsAndroid, |
428 String script, JavaScriptCallback callback); | 423 String script, JavaScriptCallback callback); |
429 private native void nativeEvaluateJavaScriptForTests(long nativeWebContentsA
ndroid, | |
430 String script, JavaScriptCallback callback); | |
431 private native void nativeAddMessageToDevToolsConsole( | 424 private native void nativeAddMessageToDevToolsConsole( |
432 long nativeWebContentsAndroid, int level, String message); | 425 long nativeWebContentsAndroid, int level, String message); |
433 private native boolean nativeHasAccessedInitialDocument( | 426 private native boolean nativeHasAccessedInitialDocument( |
434 long nativeWebContentsAndroid); | 427 long nativeWebContentsAndroid); |
435 private native int nativeGetThemeColor(long nativeWebContentsAndroid); | 428 private native int nativeGetThemeColor(long nativeWebContentsAndroid); |
436 private native void nativeRequestAccessibilitySnapshot(long nativeWebContent
sAndroid, | 429 private native void nativeRequestAccessibilitySnapshot(long nativeWebContent
sAndroid, |
437 AccessibilitySnapshotCallback callback, float offsetY, float scrollX
); | 430 AccessibilitySnapshotCallback callback, float offsetY, float scrollX
); |
438 private native void nativeResumeMediaSession(long nativeWebContentsAndroid); | 431 private native void nativeResumeMediaSession(long nativeWebContentsAndroid); |
439 private native void nativeSuspendMediaSession(long nativeWebContentsAndroid)
; | 432 private native void nativeSuspendMediaSession(long nativeWebContentsAndroid)
; |
440 } | 433 } |
OLD | NEW |