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.app.Activity; | 7 import android.app.Activity; |
8 | 8 |
9 import org.chromium.base.metrics.RecordUserAction; | 9 import org.chromium.base.metrics.RecordUserAction; |
10 import org.chromium.chrome.browser.NativePageHost; | 10 import org.chromium.chrome.browser.NativePageHost; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 TabDelegate tabDelegate = new TabDelegate(false); | 178 TabDelegate tabDelegate = new TabDelegate(false); |
179 tabDelegate.createTabInOtherWindow(loadUrlParams, mActivity, mHost.getPa
rentId()); | 179 tabDelegate.createTabInOtherWindow(loadUrlParams, mActivity, mHost.getPa
rentId()); |
180 } | 180 } |
181 | 181 |
182 private void openUrlInNewTab(LoadUrlParams loadUrlParams) { | 182 private void openUrlInNewTab(LoadUrlParams loadUrlParams) { |
183 mTabModelSelector.openNewTab(loadUrlParams, TabLaunchType.FROM_LONGPRESS
_BACKGROUND, | 183 mTabModelSelector.openNewTab(loadUrlParams, TabLaunchType.FROM_LONGPRESS
_BACKGROUND, |
184 mHost.getActiveTab(), /* incognito = */ false); | 184 mHost.getActiveTab(), /* incognito = */ false); |
185 } | 185 } |
186 | 186 |
187 private void saveUrlForOffline(String url) { | 187 private void saveUrlForOffline(String url) { |
188 OfflinePageNotificationBridge.showDownloadingToast(mActivity); | 188 OfflinePageNotificationBridge.showDownloadingToast(); |
189 OfflinePageBridge.getForProfile(mProfile).savePageLater( | 189 OfflinePageBridge.getForProfile(mProfile).savePageLater( |
190 url, "ntp_suggestions", true /* userRequested */); | 190 url, "ntp_suggestions", true /* userRequested */); |
191 } | 191 } |
192 } | 192 } |
OLD | NEW |