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) {} | |
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(int windowOpenDisposition, SnippetArticle articl e) {} | 97 public void openSnippet(int windowOpenDisposition, SnippetArticle articl e) {} |
113 | 98 |
114 @Override | 99 @Override |
115 public void focusSearchBox(boolean beginVoiceSearch, String pastedText) {} | 100 public void focusSearchBox(boolean beginVoiceSearch, String pastedText) {} |
116 | 101 |
117 @Override | 102 @Override |
118 public void setMostVisitedURLsObserver(MostVisitedURLsObserver observer, int numResults) {} | 103 public void setMostVisitedURLsObserver(MostVisitedURLsObserver observer, int numResults) {} |
119 | 104 |
120 @Override | 105 @Override |
121 public void getLocalFaviconImageForURL( | 106 public void getLocalFaviconImageForURL( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 | 140 |
156 @Override | 141 @Override |
157 public boolean isCurrentPage() { | 142 public boolean isCurrentPage() { |
158 return true; | 143 return true; |
159 } | 144 } |
160 | 145 |
161 @Override | 146 @Override |
162 public ContextMenuManager getContextMenuManager() { | 147 public ContextMenuManager getContextMenuManager() { |
163 return mContextMenuManager; | 148 return mContextMenuManager; |
164 } | 149 } |
150 | |
151 @Override | |
152 public SuggestionsMetricsReporter getSuggestionsMetricsReporter() { | |
153 return mSnippetsBridge; | |
Bernhard Bauer
2017/01/13 10:56:07
Do we have to handle the SnippetsBridge being dest
dgn
2017/01/13 11:24:04
added snippetsbridge destruction to #onDestroy().
| |
154 } | |
165 } | 155 } |
166 | 156 |
167 @Override | 157 @Override |
168 protected void onCreate(Bundle savedInstanceState) { | 158 protected void onCreate(Bundle savedInstanceState) { |
169 super.onCreate(savedInstanceState); | 159 super.onCreate(savedInstanceState); |
170 | 160 |
171 assert ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SUGGESTIONS_STA NDALONE_UI); | 161 assert ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SUGGESTIONS_STA NDALONE_UI); |
172 | 162 |
173 mRecyclerView = (NewTabPageRecyclerView) LayoutInflater.from(this).infla te( | 163 mRecyclerView = (NewTabPageRecyclerView) LayoutInflater.from(this).infla te( |
174 R.layout.new_tab_page_recycler_view, null, false); | 164 R.layout.new_tab_page_recycler_view, null, false); |
(...skipping 18 matching lines...) Expand all Loading... | |
193 } | 183 } |
194 | 184 |
195 @Override | 185 @Override |
196 protected void onDestroy() { | 186 protected void onDestroy() { |
197 for (DestructionObserver observer : mDestructionObservers) { | 187 for (DestructionObserver observer : mDestructionObservers) { |
198 observer.onDestroy(); | 188 observer.onDestroy(); |
199 } | 189 } |
200 super.onDestroy(); | 190 super.onDestroy(); |
201 } | 191 } |
202 } | 192 } |
OLD | NEW |