| 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.photo_picker; | 5 package org.chromium.chrome.browser.photo_picker; |
| 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.os.AsyncTask; | 9 import android.os.AsyncTask; |
| 10 import android.support.v7.widget.RecyclerView.ViewHolder; | 10 import android.support.v7.widget.RecyclerView.ViewHolder; |
| 11 import android.text.TextUtils; | 11 import android.text.TextUtils; |
| 12 | 12 |
| 13 import org.chromium.base.VisibleForTesting; |
| 13 import org.chromium.chrome.R; | 14 import org.chromium.chrome.R; |
| 14 | 15 |
| 15 import java.util.List; | 16 import java.util.List; |
| 16 | 17 |
| 17 /** | 18 /** |
| 18 * Holds on to a {@link PickerBitmapView} that displays information about a pick
er bitmap. | 19 * Holds on to a {@link PickerBitmapView} that displays information about a pick
er bitmap. |
| 19 */ | 20 */ |
| 20 public class PickerBitmapViewHolder | 21 public class PickerBitmapViewHolder |
| 21 extends ViewHolder implements DecoderServiceHost.ImageDecodedCallback { | 22 extends ViewHolder implements DecoderServiceHost.ImageDecodedCallback { |
| 22 // Our parent category. | 23 // Our parent category. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 102 |
| 102 mCategoryView.getDecoderServiceHost().decodeImage(filePath, size, this); | 103 mCategoryView.getDecoderServiceHost().decodeImage(filePath, size, this); |
| 103 } | 104 } |
| 104 | 105 |
| 105 /** | 106 /** |
| 106 * Returns the file path of the current request. | 107 * Returns the file path of the current request. |
| 107 */ | 108 */ |
| 108 public String getFilePath() { | 109 public String getFilePath() { |
| 109 return mBitmapDetails == null ? null : mBitmapDetails.getFilePath(); | 110 return mBitmapDetails == null ? null : mBitmapDetails.getFilePath(); |
| 110 } | 111 } |
| 112 |
| 113 @VisibleForTesting |
| 114 public boolean getImageLoadingForTesting() { |
| 115 return mItemView.getImageLoadingForTesting(); |
| 116 } |
| 111 } | 117 } |
| OLD | NEW |