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.tab; | 5 package org.chromium.chrome.browser.tab; |
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.content.Intent; | 9 import android.content.Intent; |
10 import android.content.res.Resources; | 10 import android.content.res.Resources; |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 mNativeTabAndroid, | 929 mNativeTabAndroid, |
930 params.getUrl(), | 930 params.getUrl(), |
931 params.getVerbatimHeaders(), | 931 params.getVerbatimHeaders(), |
932 params.getPostData(), | 932 params.getPostData(), |
933 params.getTransitionType(), | 933 params.getTransitionType(), |
934 params.getReferrer() != null ? params.getReferrer().getUrl()
: null, | 934 params.getReferrer() != null ? params.getReferrer().getUrl()
: null, |
935 // Policy will be ignored for null referrer url, 0 is just a
placeholder. | 935 // Policy will be ignored for null referrer url, 0 is just a
placeholder. |
936 // TODO(ppi): Should we pass Referrer jobject and add JNI me
thods to read it | 936 // TODO(ppi): Should we pass Referrer jobject and add JNI me
thods to read it |
937 // from the native? | 937 // from the native? |
938 params.getReferrer() != null ? params.getReferrer().getPolic
y() : 0, | 938 params.getReferrer() != null ? params.getReferrer().getPolic
y() : 0, |
939 params.getIsRendererInitiated(), params.getIntentReceivedTim
estamp()); | 939 params.getIsRendererInitiated(), params.getIntentReceivedTim
estamp(), |
| 940 params.getHasUserGesture()); |
940 | 941 |
941 for (TabObserver observer : mObservers) { | 942 for (TabObserver observer : mObservers) { |
942 observer.onLoadUrl(this, params, loadType); | 943 observer.onLoadUrl(this, params, loadType); |
943 } | 944 } |
944 return loadType; | 945 return loadType; |
945 } finally { | 946 } finally { |
946 TraceEvent.end("Tab.loadUrl"); | 947 TraceEvent.end("Tab.loadUrl"); |
947 } | 948 } |
948 } | 949 } |
949 | 950 |
(...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2815 | 2816 |
2816 private native void nativeInit(); | 2817 private native void nativeInit(); |
2817 private native void nativeDestroy(long nativeTabAndroid); | 2818 private native void nativeDestroy(long nativeTabAndroid); |
2818 private native void nativeInitWebContents(long nativeTabAndroid, boolean inc
ognito, | 2819 private native void nativeInitWebContents(long nativeTabAndroid, boolean inc
ognito, |
2819 ContentViewCore contentViewCore, ChromeWebContentsDelegateAndroid de
legate, | 2820 ContentViewCore contentViewCore, ChromeWebContentsDelegateAndroid de
legate, |
2820 ContextMenuPopulator contextMenuPopulator); | 2821 ContextMenuPopulator contextMenuPopulator); |
2821 private native void nativeDestroyWebContents(long nativeTabAndroid, boolean
deleteNative); | 2822 private native void nativeDestroyWebContents(long nativeTabAndroid, boolean
deleteNative); |
2822 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); | 2823 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); |
2823 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, | 2824 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, |
2824 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, | 2825 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, |
2825 boolean isRendererInitiated, long intentReceivedTimestamp); | 2826 boolean isRendererInitiated, long intentReceivedTimestamp, boolean h
asUserGesture); |
2826 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, | 2827 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, |
2827 String title); | 2828 String title); |
2828 private native boolean nativePrint(long nativeTabAndroid); | 2829 private native boolean nativePrint(long nativeTabAndroid); |
2829 private native Bitmap nativeGetFavicon(long nativeTabAndroid); | 2830 private native Bitmap nativeGetFavicon(long nativeTabAndroid); |
2830 private native void nativeCreateHistoricalTab(long nativeTabAndroid); | 2831 private native void nativeCreateHistoricalTab(long nativeTabAndroid); |
2831 private native void nativeUpdateTopControlsState( | 2832 private native void nativeUpdateTopControlsState( |
2832 long nativeTabAndroid, int constraints, int current, boolean animate
); | 2833 long nativeTabAndroid, int constraints, int current, boolean animate
); |
2833 private native void nativeLoadOriginalImage(long nativeTabAndroid); | 2834 private native void nativeLoadOriginalImage(long nativeTabAndroid); |
2834 private native void nativeSearchByImageInNewTabAsync(long nativeTabAndroid); | 2835 private native void nativeSearchByImageInNewTabAsync(long nativeTabAndroid); |
2835 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); | 2836 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); |
2836 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 2837 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
2837 InterceptNavigationDelegate delegate); | 2838 InterceptNavigationDelegate delegate); |
2838 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 2839 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
2839 TabContentManager tabContentManager); | 2840 TabContentManager tabContentManager); |
2840 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, | 2841 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, |
2841 ContentViewCore content, boolean visible); | 2842 ContentViewCore content, boolean visible); |
2842 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, | 2843 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, |
2843 ContentViewCore content); | 2844 ContentViewCore content); |
2844 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 2845 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
2845 | 2846 |
2846 private static native void nativeRecordStartupToCommitUma(); | 2847 private static native void nativeRecordStartupToCommitUma(); |
2847 } | 2848 } |
OLD | NEW |