Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionListItem.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionListItem.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionListItem.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9d93dab4d19143fbeb01667f0140eea3f0bddec2 |
--- /dev/null |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionListItem.java |
@@ -0,0 +1,35 @@ |
+// 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.ntp.cards; |
+ |
+import android.view.View; |
+ |
+import org.chromium.chrome.R; |
+import org.chromium.chrome.browser.ntp.NewTabPageView.NewTabPageManager; |
+import org.chromium.chrome.browser.ntp.UiConfig; |
+ |
+/** |
+ * Item that allows the user to perform an action on the NTP. |
+ */ |
+class ActionListItem implements NewTabPageListItem { |
+ @Override |
+ public int getType() { |
+ return NewTabPageListItem.VIEW_TYPE_ACTION; |
+ } |
+ |
+ public static class ViewHolder extends CardViewHolder { |
+ public ViewHolder(NewTabPageRecyclerView recyclerView, final NewTabPageManager manager, |
+ UiConfig uiConfig) { |
+ super(R.layout.new_tab_page_action_card, recyclerView, uiConfig); |
+ itemView.setOnClickListener(new View.OnClickListener() { |
+ @Override |
+ public void onClick(View v) { |
+ // TODO(dgn): Implement other behaviours. |
+ manager.navigateToBookmarks(); |
+ } |
+ }); |
+ } |
+ } |
+} |