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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java

Issue 2754313002: [Home] Record some user actions for the Chrome Home BottomSheet (Closed)
Patch Set: Update tests Created 3 years, 9 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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.view.View; 7 import android.view.View;
8 8
9 import org.chromium.chrome.browser.ChromeActivity; 9 import org.chromium.chrome.browser.ChromeActivity;
10 import org.chromium.chrome.browser.NativePageHost; 10 import org.chromium.chrome.browser.NativePageHost;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 @Override 87 @Override
88 public int getVerticalScrollOffset() { 88 public int getVerticalScrollOffset() {
89 return mRecyclerView.computeVerticalScrollOffset(); 89 return mRecyclerView.computeVerticalScrollOffset();
90 } 90 }
91 91
92 public ContextMenuManager getContextMenuManager() { 92 public ContextMenuManager getContextMenuManager() {
93 return mContextMenuManager; 93 return mContextMenuManager;
94 } 94 }
95 95
96 @Override
96 public void destroy() { 97 public void destroy() {
97 mSuggestionsManager.onDestroy(); 98 mSuggestionsManager.onDestroy();
98 mTileGroupDelegate.destroy(); 99 mTileGroupDelegate.destroy();
99 } 100 }
100 101
102 @Override
103 public String getMetricsName() {
104 return "Suggestions";
105 }
106
101 public static void setSuggestionsSourceForTesting(SuggestionsSource suggesti onsSource) { 107 public static void setSuggestionsSourceForTesting(SuggestionsSource suggesti onsSource) {
102 sSuggestionsSourceForTesting = suggestionsSource; 108 sSuggestionsSourceForTesting = suggestionsSource;
103 } 109 }
104 110
105 public static void setMetricsReporterForTesting(SuggestionsMetricsReporter m etricsReporter) { 111 public static void setMetricsReporterForTesting(SuggestionsMetricsReporter m etricsReporter) {
106 sMetricsReporterForTesting = metricsReporter; 112 sMetricsReporterForTesting = metricsReporter;
107 } 113 }
108 114
109 private static SuggestionsUiDelegateImpl createSuggestionsDelegate(Profile p rofile, 115 private static SuggestionsUiDelegateImpl createSuggestionsDelegate(Profile p rofile,
110 SuggestionsNavigationDelegate navigationDelegate, NativePageHost hos t) { 116 SuggestionsNavigationDelegate navigationDelegate, NativePageHost hos t) {
(...skipping 15 matching lines...) Expand all
126 metricsReporter = sMetricsReporterForTesting; 132 metricsReporter = sMetricsReporterForTesting;
127 } 133 }
128 134
129 SuggestionsUiDelegateImpl delegate = new SuggestionsUiDelegateImpl( 135 SuggestionsUiDelegateImpl delegate = new SuggestionsUiDelegateImpl(
130 suggestionsSource, metricsReporter, navigationDelegate, profile, host); 136 suggestionsSource, metricsReporter, navigationDelegate, profile, host);
131 if (snippetsBridge != null) delegate.addDestructionObserver(snippetsBrid ge); 137 if (snippetsBridge != null) delegate.addDestructionObserver(snippetsBrid ge);
132 138
133 return delegate; 139 return delegate;
134 } 140 }
135 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698