1 // Copyright (c) 2013-2014 Intel Corporation. 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.xwalk.core.internal;
7 import org.chromium.content_public.browser.NavigationEntry;
10 * This class represents a navigation item and is managed in XWalkNavigationHistoryInternal.
12 @XWalkAPI(createInternally = true)
13 public class XWalkNavigationItemInternal implements Cloneable {
14 private NavigationEntry mEntry;
16 // Never use this constructor.
17 // It is only used in XWalkNavigationItemBridge.
18 XWalkNavigationItemInternal() {
22 XWalkNavigationItemInternal(NavigationEntry entry) {
26 XWalkNavigationItemInternal(XWalkNavigationItemInternal item) {
31 * Get the url of current navigation item.
32 * @return the string of the url.
36 public String getUrl() {
37 return mEntry.getUrl();
41 * Get the original url of current navigation item.
42 * @return the string of the original url.
46 public String getOriginalUrl() {
47 return mEntry.getOriginalUrl();
51 * Get the title of current navigation item.
52 * @return the string of the title.
56 public String getTitle() {
57 return mEntry.getTitle();
60 protected synchronized XWalkNavigationItemInternal clone() {
61 return new XWalkNavigationItemInternal(this);