OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.chrome.browser; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 int loadType = nativeLoadUrl( | 408 int loadType = nativeLoadUrl( |
409 mNativeTabAndroid, | 409 mNativeTabAndroid, |
410 params.getUrl(), | 410 params.getUrl(), |
411 params.getVerbatimHeaders(), | 411 params.getVerbatimHeaders(), |
412 params.getPostData(), | 412 params.getPostData(), |
413 params.getTransitionType(), | 413 params.getTransitionType(), |
414 params.getReferrer() != null ? params.getReferrer().getUrl() : n
ull, | 414 params.getReferrer() != null ? params.getReferrer().getUrl() : n
ull, |
415 // Policy will be ignored for null referrer url, 0 is just a pla
ceholder. | 415 // Policy will be ignored for null referrer url, 0 is just a pla
ceholder. |
416 // TODO(ppi): Should we pass Referrer jobject and add JNI method
s to read it from | 416 // TODO(ppi): Should we pass Referrer jobject and add JNI method
s to read it from |
417 // the native? | 417 // the native? |
418 params.getReferrer() != null ? params.getReferrer().getPolicy()
: 0); | 418 params.getReferrer() != null ? params.getReferrer().getPolicy()
: 0, |
| 419 params.getIsRendererInitiated()); |
419 | 420 |
420 TraceEvent.end(); | 421 TraceEvent.end(); |
421 | 422 |
422 for (TabObserver observer : mObservers) { | 423 for (TabObserver observer : mObservers) { |
423 observer.onLoadUrl(this, params.getUrl(), loadType); | 424 observer.onLoadUrl(this, params.getUrl(), loadType); |
424 } | 425 } |
425 return loadType; | 426 return loadType; |
426 } | 427 } |
427 | 428 |
428 /** | 429 /** |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 | 1117 |
1117 private native void nativeInit(); | 1118 private native void nativeInit(); |
1118 private native void nativeDestroy(long nativeTabAndroid); | 1119 private native void nativeDestroy(long nativeTabAndroid); |
1119 private native void nativeInitWebContents(long nativeTabAndroid, boolean inc
ognito, | 1120 private native void nativeInitWebContents(long nativeTabAndroid, boolean inc
ognito, |
1120 ContentViewCore contentViewCore, ChromeWebContentsDelegateAndroid de
legate, | 1121 ContentViewCore contentViewCore, ChromeWebContentsDelegateAndroid de
legate, |
1121 ContextMenuPopulator contextMenuPopulator); | 1122 ContextMenuPopulator contextMenuPopulator); |
1122 private native void nativeDestroyWebContents(long nativeTabAndroid, boolean
deleteNative); | 1123 private native void nativeDestroyWebContents(long nativeTabAndroid, boolean
deleteNative); |
1123 private native WebContents nativeGetWebContents(long nativeTabAndroid); | 1124 private native WebContents nativeGetWebContents(long nativeTabAndroid); |
1124 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); | 1125 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); |
1125 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, | 1126 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, |
1126 byte[] postData, int transition, String referrerUrl, int referrerPol
icy); | 1127 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, |
| 1128 boolean isRendererInitiated); |
1127 private native int nativeGetSecurityLevel(long nativeTabAndroid); | 1129 private native int nativeGetSecurityLevel(long nativeTabAndroid); |
1128 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, | 1130 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, |
1129 String title); | 1131 String title); |
1130 private native boolean nativePrint(long nativeTabAndroid); | 1132 private native boolean nativePrint(long nativeTabAndroid); |
1131 } | 1133 } |
OLD | NEW |