| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.ntp; | 5 package org.chromium.chrome.browser.ntp; |
| 6 | 6 |
| 7 import android.annotation.TargetApi; | 7 import android.annotation.TargetApi; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.graphics.Canvas; | 9 import android.graphics.Canvas; |
| 10 import android.graphics.Point; | 10 import android.graphics.Point; |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 @Override | 450 @Override |
| 451 public void navigateToRecentTabs() { | 451 public void navigateToRecentTabs() { |
| 452 if (mIsDestroyed) return; | 452 if (mIsDestroyed) return; |
| 453 RecordUserAction.record("MobileNTPSwitchToOpenTabs"); | 453 RecordUserAction.record("MobileNTPSwitchToOpenTabs"); |
| 454 mTab.loadUrl(new LoadUrlParams(UrlConstants.RECENT_TABS_URL)); | 454 mTab.loadUrl(new LoadUrlParams(UrlConstants.RECENT_TABS_URL)); |
| 455 } | 455 } |
| 456 | 456 |
| 457 @Override | 457 @Override |
| 458 public void navigateToDownloadManager() { | 458 public void navigateToDownloadManager() { |
| 459 if (mIsDestroyed) return; | 459 if (mIsDestroyed) return; |
| 460 assert ChromeFeatureList.isEnabled("DownloadsUi"); | 460 assert DownloadUtils.isDownloadHomeEnabled(); |
| 461 RecordUserAction.record("MobileNTPSwitchToDownloadManager"); | 461 RecordUserAction.record("MobileNTPSwitchToDownloadManager"); |
| 462 DownloadUtils.showDownloadManager(mActivity, mTab); | 462 DownloadUtils.showDownloadManager(mActivity, mTab); |
| 463 } | 463 } |
| 464 | 464 |
| 465 @Override | 465 @Override |
| 466 public void focusSearchBox(boolean beginVoiceSearch, String pastedText)
{ | 466 public void focusSearchBox(boolean beginVoiceSearch, String pastedText)
{ |
| 467 if (mIsDestroyed) return; | 467 if (mIsDestroyed) return; |
| 468 if (mFakeboxDelegate != null) { | 468 if (mFakeboxDelegate != null) { |
| 469 if (beginVoiceSearch) { | 469 if (beginVoiceSearch) { |
| 470 mFakeboxDelegate.startVoiceRecognition(); | 470 mFakeboxDelegate.startVoiceRecognition(); |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 @Override | 997 @Override |
| 998 public boolean shouldCaptureThumbnail() { | 998 public boolean shouldCaptureThumbnail() { |
| 999 return mNewTabPageView.shouldCaptureThumbnail(); | 999 return mNewTabPageView.shouldCaptureThumbnail(); |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 @Override | 1002 @Override |
| 1003 public void captureThumbnail(Canvas canvas) { | 1003 public void captureThumbnail(Canvas canvas) { |
| 1004 mNewTabPageView.captureThumbnail(canvas); | 1004 mNewTabPageView.captureThumbnail(canvas); |
| 1005 } | 1005 } |
| 1006 } | 1006 } |
| OLD | NEW |