Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 class OfflineItemVisualsBridge { | |
|
nyquist
2017/04/13 05:08:24
Nit: also add final modifier to class?
David Trainor- moved to gerrit
2017/04/13 07:20:23
Done.
| |
| 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 } | |
| OLD | NEW |