Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmapViewHolder.java

Issue 2894523004: Photo Picker dialog: Add a test. (Closed)
Patch Set: Fix vector drawable error Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698