Index: chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..97e328f9ad972187a137c03cdf45e0869c5214c7 |
--- /dev/null |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java |
@@ -0,0 +1,59 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.chrome.browser.history; |
+ |
+import android.app.Activity; |
+import android.view.View; |
+ |
+import org.chromium.chrome.R; |
+import org.chromium.chrome.browser.BasicNativePage; |
+import org.chromium.chrome.browser.UrlConstants; |
+import org.chromium.chrome.browser.tab.Tab; |
+ |
+/** |
+ * Native page for managing browsing history. |
+ */ |
+public class HistoryPage extends BasicNativePage { |
+ private HistoryManager mHistoryManager; |
+ private String mTitle; |
+ |
+ /** |
+ * Create a new instance of the history page. |
+ * @param activity The {@link Activity} used to get context and instantiate the |
+ * {@link HistoryManager}. |
+ * @param tab The tab to load URLs. |
+ */ |
+ public HistoryPage(Activity activity, Tab tab) { |
+ super(activity, tab); |
+ } |
+ |
+ @Override |
+ protected void initialize(Activity activity, final Tab tab) { |
+ mHistoryManager = new HistoryManager(activity); |
+ mTitle = activity.getString(R.string.menu_history); |
+ } |
+ |
+ @Override |
+ public View getView() { |
+ return mHistoryManager.getView(); |
+ } |
+ |
+ @Override |
+ public String getTitle() { |
+ return mTitle; |
+ } |
+ |
+ @Override |
+ public String getHost() { |
+ return UrlConstants.HISTORY_HOST; |
+ } |
+ |
+ @Override |
+ public void destroy() { |
+ mHistoryManager.onDestroyed(); |
+ mHistoryManager = null; |
+ super.destroy(); |
+ } |
+} |