Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java |
| index 6cb1f91b21014de41ba51ae07b81e1ddb8ffc665..2e5c9e3035cead8c6c9d891d17293fe1d8ea1407 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java |
| @@ -134,6 +134,9 @@ public class NewTabPageView extends FrameLayout |
| /** Opens a given URL in the current tab. */ |
| void open(String url); |
| + /** Opens the recent tabs page in the current tab. */ |
| + void navigateToInterests(); |
| + |
| /** |
| * Animates the search box up into the omnibox and bring up the keyboard. |
| * @param beginVoiceSearch Whether to begin a voice search. |
| @@ -307,6 +310,12 @@ public class NewTabPageView extends FrameLayout |
| mManager.navigateToBookmarks(); |
| } |
| }); |
| + toolbar.getInterestsButton().setOnClickListener(new View.OnClickListener() { |
| + @Override |
| + public void onClick(View v) { |
| + mManager.navigateToInterests(); |
| + } |
| + }); |
| initializeSearchBoxScrollHandling(); |
| addOnLayoutChangeListener(this); |
| @@ -325,6 +334,11 @@ public class NewTabPageView extends FrameLayout |
| mSnippetsView.setLayoutManager(new LinearLayoutManager(getContext())); |
| mSnippetsManager = new SnippetsManager(mManager, mSnippetsView); |
| } |
| + |
| + // Set up interests |
| + if (CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_NTP_INTERESTS)) { |
|
knn
2015/12/02 14:18:59
Can we check if user is signed in here?
PEConn
2015/12/08 17:27:50
Done.
|
| + toolbar.getInterestsButton().setVisibility(View.VISIBLE); |
| + } |
| } |
| private int getTabsMovedIllustration() { |