1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
content / public / android / java / src / org / chromium / content_public / browser / LoadCommittedDetails.java [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.content_public.browser;
import org.jni_zero.CalledByNative;
import org.jni_zero.JNINamespace;
import org.chromium.url.GURL;
/**
* Provides the details of a committed navigation entry for the
* {@link WebContentsObserver#navigationEntryCommitted(LoadCommittedDetails)}.
*/
@JNINamespace("content")
public class LoadCommittedDetails {
private final boolean mDidReplaceEntry;
private final int mPreviousEntryIndex;
private final GURL mPreviousMainFrameUrl;
private final boolean mIsSameDocument;
private final boolean mIsMainFrame;
private final int mHttpStatusCode;
@CalledByNative
public LoadCommittedDetails(
int previousEntryIndex,
GURL previousMainFrameUrl,
boolean didReplaceEntry,
boolean isSameDocument,
boolean isMainFrame,
int httpStatusCode) {
mPreviousEntryIndex = previousEntryIndex;
mPreviousMainFrameUrl = previousMainFrameUrl;
mDidReplaceEntry = didReplaceEntry;
mIsSameDocument = isSameDocument;
mIsMainFrame = isMainFrame;
mHttpStatusCode = httpStatusCode;
}
public boolean didReplaceEntry() {
return mDidReplaceEntry;
}
public int getPreviousEntryIndex() {
return mPreviousEntryIndex;
}
public GURL getPreviousMainFrameUrl() {
return mPreviousMainFrameUrl;
}
public boolean isSameDocument() {
return mIsSameDocument;
}
public boolean isMainFrame() {
return mIsMainFrame;
}
public int getHttpStatusCode() {
return mHttpStatusCode;
}
}