| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.suggestions; | 5 package org.chromium.chrome.browser.suggestions; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.content.Intent; | 8 import android.content.Intent; |
| 9 import android.os.Bundle; | 9 import android.os.Bundle; |
| 10 import android.view.LayoutInflater; | 10 import android.view.LayoutInflater; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 @Override | 87 @Override |
| 88 public void navigateToBookmarks() {} | 88 public void navigateToBookmarks() {} |
| 89 | 89 |
| 90 @Override | 90 @Override |
| 91 public void navigateToRecentTabs() {} | 91 public void navigateToRecentTabs() {} |
| 92 | 92 |
| 93 @Override | 93 @Override |
| 94 public void navigateToDownloadManager() {} | 94 public void navigateToDownloadManager() {} |
| 95 | 95 |
| 96 @Override | 96 @Override |
| 97 public void trackSnippetsPageImpression(int[] categories, int[] suggesti
onsPerCategory) {} | 97 public void openSnippet(int windowOpenDisposition, SnippetArticle articl
e) {} |
| 98 | |
| 99 @Override | |
| 100 public void trackSnippetImpression(SnippetArticle article) {} | |
| 101 | |
| 102 @Override | |
| 103 public void trackSnippetMenuOpened(SnippetArticle article) {} | |
| 104 | |
| 105 @Override | |
| 106 public void trackSnippetCategoryActionImpression(int category, int posit
ion) {} | |
| 107 | |
| 108 @Override | |
| 109 public void trackSnippetCategoryActionClick(int category, int position)
{} | |
| 110 | |
| 111 @Override | |
| 112 public void openSnippet( | |
| 113 int windowOpenDisposition, SnippetArticle article, int categoryI
ndex) {} | |
| 114 | 98 |
| 115 @Override | 99 @Override |
| 116 public void focusSearchBox(boolean beginVoiceSearch, String pastedText)
{} | 100 public void focusSearchBox(boolean beginVoiceSearch, String pastedText)
{} |
| 117 | 101 |
| 118 @Override | 102 @Override |
| 119 public void setMostVisitedURLsObserver(MostVisitedURLsObserver observer,
int numResults) {} | 103 public void setMostVisitedURLsObserver(MostVisitedURLsObserver observer,
int numResults) {} |
| 120 | 104 |
| 121 @Override | 105 @Override |
| 122 public void getLocalFaviconImageForURL( | 106 public void getLocalFaviconImageForURL( |
| 123 String url, int size, FaviconImageCallback faviconCallback) {} | 107 String url, int size, FaviconImageCallback faviconCallback) {} |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 140 |
| 157 @Override | 141 @Override |
| 158 public boolean isCurrentPage() { | 142 public boolean isCurrentPage() { |
| 159 return true; | 143 return true; |
| 160 } | 144 } |
| 161 | 145 |
| 162 @Override | 146 @Override |
| 163 public ContextMenuManager getContextMenuManager() { | 147 public ContextMenuManager getContextMenuManager() { |
| 164 return mContextMenuManager; | 148 return mContextMenuManager; |
| 165 } | 149 } |
| 150 |
| 151 @Override |
| 152 public SuggestionsMetricsReporter getSuggestionsMetricsReporter() { |
| 153 return mSnippetsBridge; |
| 154 } |
| 166 } | 155 } |
| 167 | 156 |
| 168 @Override | 157 @Override |
| 169 protected void onCreate(Bundle savedInstanceState) { | 158 protected void onCreate(Bundle savedInstanceState) { |
| 170 super.onCreate(savedInstanceState); | 159 super.onCreate(savedInstanceState); |
| 171 | 160 |
| 172 assert ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SUGGESTIONS_STA
NDALONE_UI); | 161 assert ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SUGGESTIONS_STA
NDALONE_UI); |
| 173 | 162 |
| 174 mRecyclerView = (NewTabPageRecyclerView) LayoutInflater.from(this).infla
te( | 163 mRecyclerView = (NewTabPageRecyclerView) LayoutInflater.from(this).infla
te( |
| 175 R.layout.new_tab_page_recycler_view, null, false); | 164 R.layout.new_tab_page_recycler_view, null, false); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 191 @Override | 180 @Override |
| 192 public void onContextMenuClosed(Menu menu) { | 181 public void onContextMenuClosed(Menu menu) { |
| 193 mContextMenuManager.onContextMenuClosed(); | 182 mContextMenuManager.onContextMenuClosed(); |
| 194 } | 183 } |
| 195 | 184 |
| 196 @Override | 185 @Override |
| 197 protected void onDestroy() { | 186 protected void onDestroy() { |
| 198 for (DestructionObserver observer : mDestructionObservers) { | 187 for (DestructionObserver observer : mDestructionObservers) { |
| 199 observer.onDestroy(); | 188 observer.onDestroy(); |
| 200 } | 189 } |
| 190 |
| 191 mSnippetsBridge.destroy(); |
| 192 mSnippetsBridge = null; |
| 193 |
| 201 super.onDestroy(); | 194 super.onDestroy(); |
| 202 } | 195 } |
| 203 } | 196 } |
| OLD | NEW |