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
3 // found in the LICENSE file.
5 package org.chromium.components.navigation_interception;
7 import org.chromium.base.CalledByNative;
9 public class NavigationParams {
10 // Target url of the navigation.
11 public final String url;
12 // True if the the navigation method is "POST".
13 public final boolean isPost;
14 // True if the navigation was initiated by the user.
15 public final boolean hasUserGesture;
16 // Page transition type (e.g. link / typed).
17 public final int pageTransitionType;
18 // Is the navigation a redirect (in which case url is the "target" address).
19 public final boolean isRedirect;
21 public NavigationParams(String url, boolean isPost, boolean hasUserGesture,
22 int pageTransitionType, boolean isRedirect) {
25 this.hasUserGesture = hasUserGesture;
26 this.pageTransitionType = pageTransitionType;
27 this.isRedirect = isRedirect;
31 public static NavigationParams create(String url, boolean isPost, boolean hasUserGesture,
32 int pageTransitionType, boolean isRedirect) {
33 return new NavigationParams(url, isPost, hasUserGesture, pageTransitionType,