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.snippets; | 5 package org.chromium.chrome.browser.ntp.snippets; |
6 | 6 |
7 import android.content.res.Resources; | 7 import android.content.res.Resources; |
8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
9 import android.graphics.drawable.BitmapDrawable; | 9 import android.graphics.drawable.BitmapDrawable; |
10 import android.graphics.drawable.Drawable; | 10 import android.graphics.drawable.Drawable; |
(...skipping 24 matching lines...) Expand all Loading... |
35 import org.chromium.chrome.browser.ntp.DisplayStyleObserver; | 35 import org.chromium.chrome.browser.ntp.DisplayStyleObserver; |
36 import org.chromium.chrome.browser.ntp.NewTabPageUma; | 36 import org.chromium.chrome.browser.ntp.NewTabPageUma; |
37 import org.chromium.chrome.browser.ntp.NewTabPageView.NewTabPageManager; | 37 import org.chromium.chrome.browser.ntp.NewTabPageView.NewTabPageManager; |
38 import org.chromium.chrome.browser.ntp.UiConfig; | 38 import org.chromium.chrome.browser.ntp.UiConfig; |
39 import org.chromium.chrome.browser.ntp.cards.CardViewHolder; | 39 import org.chromium.chrome.browser.ntp.cards.CardViewHolder; |
40 import org.chromium.chrome.browser.ntp.cards.CardsVariationParameters; | 40 import org.chromium.chrome.browser.ntp.cards.CardsVariationParameters; |
41 import org.chromium.chrome.browser.ntp.cards.DisplayStyleObserverAdapter; | 41 import org.chromium.chrome.browser.ntp.cards.DisplayStyleObserverAdapter; |
42 import org.chromium.chrome.browser.ntp.cards.ImpressionTracker; | 42 import org.chromium.chrome.browser.ntp.cards.ImpressionTracker; |
43 import org.chromium.chrome.browser.ntp.cards.NewTabPageRecyclerView; | 43 import org.chromium.chrome.browser.ntp.cards.NewTabPageRecyclerView; |
44 import org.chromium.chrome.browser.offlinepages.OfflinePageBridge; | 44 import org.chromium.chrome.browser.offlinepages.OfflinePageBridge; |
45 import org.chromium.ui.WindowOpenDisposition; | 45 import org.chromium.mojom.ui.mojom.WindowOpenDisposition; |
46 | 46 |
47 import java.net.URI; | 47 import java.net.URI; |
48 import java.net.URISyntaxException; | 48 import java.net.URISyntaxException; |
49 import java.util.concurrent.TimeUnit; | 49 import java.util.concurrent.TimeUnit; |
50 | 50 |
51 /** | 51 /** |
52 * A class that represents the view for a single card snippet. | 52 * A class that represents the view for a single card snippet. |
53 */ | 53 */ |
54 public class SnippetArticleViewHolder extends CardViewHolder implements Impressi
onTracker.Listener { | 54 public class SnippetArticleViewHolder extends CardViewHolder implements Impressi
onTracker.Listener { |
55 private static final String PUBLISHER_FORMAT_STRING = "%s - %s"; | 55 private static final String PUBLISHER_FORMAT_STRING = "%s - %s"; |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 ApiCompatibilityUtils.setCompoundDrawablesRelative( | 462 ApiCompatibilityUtils.setCompoundDrawablesRelative( |
463 mPublisherTextView, drawable, null, null, null); | 463 mPublisherTextView, drawable, null, null, null); |
464 mPublisherTextView.setVisibility(View.VISIBLE); | 464 mPublisherTextView.setVisibility(View.VISIBLE); |
465 } | 465 } |
466 | 466 |
467 @Override | 467 @Override |
468 public boolean isDismissable() { | 468 public boolean isDismissable() { |
469 return !isPeeking(); | 469 return !isPeeking(); |
470 } | 470 } |
471 } | 471 } |
OLD | NEW |