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

Side by Side Diff: components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/bridges/OfflineItemVisualsBridge.java

Issue 2811803006: Add support for pulling icons for OfflineItems (Closed)
Patch Set: More findbugs Created 3 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.components.offline_items_collection.bridges;
6
7 import android.graphics.Bitmap;
8
9 import org.chromium.base.annotations.CalledByNative;
10 import org.chromium.base.annotations.JNINamespace;
11 import org.chromium.components.offline_items_collection.OfflineItemVisuals;
12
13 /**
14 * The Java counterpart to the C++ class OfflineItemVisualsBridge
15 * (components/offline_items_collection/core/android/offline_item_visuals_bridge .h). This class has
16 * no public members or methods and is meant as a private factory to build
17 * {@link OfflineItemVisuals} instances.
18 */
19 @JNINamespace("offline_items_collection::android")
20 public final class OfflineItemVisualsBridge {
21 private OfflineItemVisualsBridge() {}
22
23 /**
24 * This is a helper method to allow C++ to create an {@link OfflineItemVisua ls} object.
25 * @return The newly created {@link OfflineItemVisuals} based on the input p arameters.
26 */
27 @CalledByNative
28 private static OfflineItemVisuals createOfflineItemVisuals(Bitmap icon) {
29 OfflineItemVisuals visuals = new OfflineItemVisuals();
30 visuals.icon = icon;
31 return visuals;
32 }
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698