OLD | NEW |
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 @Override | 83 @Override |
84 public View getToolbarView() { | 84 public View getToolbarView() { |
85 return null; | 85 return null; |
86 } | 86 } |
87 | 87 |
88 @Override | 88 @Override |
89 public int getVerticalScrollOffset() { | 89 public int getVerticalScrollOffset() { |
90 return mRecyclerView.computeVerticalScrollOffset(); | 90 return mRecyclerView.computeVerticalScrollOffset(); |
91 } | 91 } |
92 | 92 |
93 public ContextMenuManager getContextMenuManager() { | |
94 return mContextMenuManager; | |
95 } | |
96 | |
97 @Override | 93 @Override |
98 public void destroy() { | 94 public void destroy() { |
99 mSuggestionsManager.onDestroy(); | 95 mSuggestionsManager.onDestroy(); |
100 mTileGroupDelegate.destroy(); | 96 mTileGroupDelegate.destroy(); |
101 } | 97 } |
102 | 98 |
103 @Override | 99 @Override |
104 public int getType() { | 100 public int getType() { |
105 return BottomSheetContentController.TYPE_SUGGESTIONS; | 101 return BottomSheetContentController.TYPE_SUGGESTIONS; |
106 } | 102 } |
(...skipping 26 matching lines...) Expand all Loading... |
133 metricsReporter = sMetricsReporterForTesting; | 129 metricsReporter = sMetricsReporterForTesting; |
134 } | 130 } |
135 | 131 |
136 SuggestionsUiDelegateImpl delegate = new SuggestionsUiDelegateImpl( | 132 SuggestionsUiDelegateImpl delegate = new SuggestionsUiDelegateImpl( |
137 suggestionsSource, metricsReporter, navigationDelegate, profile,
host); | 133 suggestionsSource, metricsReporter, navigationDelegate, profile,
host); |
138 if (snippetsBridge != null) delegate.addDestructionObserver(snippetsBrid
ge); | 134 if (snippetsBridge != null) delegate.addDestructionObserver(snippetsBrid
ge); |
139 | 135 |
140 return delegate; | 136 return delegate; |
141 } | 137 } |
142 } | 138 } |
OLD | NEW |