Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1685)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java

Issue 2552353002: [Android History] Add basic tablet support (Closed)
Patch Set: Address dfalcantara@ comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698