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

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

Issue 2811803006: Add support for pulling icons for OfflineItems (Closed)
Patch Set: Cleaned up the CL 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
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.components.offline_items_collection; 5 package org.chromium.components.offline_items_collection;
6 6
7 import android.support.annotation.Nullable;
8
7 import java.util.ArrayList; 9 import java.util.ArrayList;
8 10
9 /** 11 /**
10 * This interface is a Java counterpart to the C++ OfflineContentProvider 12 * This interface is a Java counterpart to the C++ OfflineContentProvider
11 * (components/offline_items_collection/core/offline_content_provider.h) class. 13 * (components/offline_items_collection/core/offline_content_provider.h) class.
12 */ 14 */
13 public interface OfflineContentProvider { 15 public interface OfflineContentProvider {
14 /** This interface is a Java counterpart to the C++ OfflineContentProvider:: Observer 16 /**
17 * This interface is a Java counterpart to the C++ base::Callback meant to b e used in response
18 * to {@link OfflineItemVisuals} requests.
19 */
20 interface VisualsCallback {
21 /**
22 * @param id The {@link ContentId} that {@code visuals} is associat ed with.
23 * @param visuals The {@link OfflineItemVisuals}, if any, associated wit h {@code id}.
24 */
25 void onVisualsAvailable(ContentId id, @Nullable OfflineItemVisuals visua ls);
26 }
27
28 /**
29 * This interface is a Java counterpart to the C++ OfflineContentProvider::O bserver
15 * (components/offline_items_collection/core/offline_content_provider.h) cla ss. 30 * (components/offline_items_collection/core/offline_content_provider.h) cla ss.
16 */ 31 */
17 interface Observer { 32 interface Observer {
18 /** See OfflineContentProvider::Observer::OnItemsAvailable(...). */ 33 /** See OfflineContentProvider::Observer::OnItemsAvailable(...). */
19 void onItemsAvailable(); 34 void onItemsAvailable();
20 35
21 /** See OfflineContentProvider::Observer::OnItemsAdded(...). */ 36 /** See OfflineContentProvider::Observer::OnItemsAdded(...). */
22 void onItemsAdded(ArrayList<OfflineItem> items); 37 void onItemsAdded(ArrayList<OfflineItem> items);
23 38
24 /** See OfflineContentProvider::Observer::OnItemRemoved(...). */ 39 /** See OfflineContentProvider::Observer::OnItemRemoved(...). */
(...skipping 20 matching lines...) Expand all
45 60
46 /** See OfflineContentProvider::ResumeDownload(...). */ 61 /** See OfflineContentProvider::ResumeDownload(...). */
47 void resumeDownload(ContentId id); 62 void resumeDownload(ContentId id);
48 63
49 /** See OfflineContentProvider::GetItemById(...). */ 64 /** See OfflineContentProvider::GetItemById(...). */
50 OfflineItem getItemById(ContentId id); 65 OfflineItem getItemById(ContentId id);
51 66
52 /** See OfflineContentProvider::GetAllItems(). */ 67 /** See OfflineContentProvider::GetAllItems(). */
53 ArrayList<OfflineItem> getAllItems(); 68 ArrayList<OfflineItem> getAllItems();
54 69
70 /** See OfflineContentProvider::GetVisualsForItem(...). */
71 void getVisualsForItem(ContentId id, VisualsCallback callback);
72
55 /** See OfflineContentProvider::AddObserver(...). */ 73 /** See OfflineContentProvider::AddObserver(...). */
56 void addObserver(Observer observer); 74 void addObserver(Observer observer);
57 75
58 /** See OfflineContentProvider::RemoveObserver(...). */ 76 /** See OfflineContentProvider::RemoveObserver(...). */
59 void removeObserver(Observer observer); 77 void removeObserver(Observer observer);
60 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698