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

Side by Side Diff: ui/android/java/src/org/chromium/ui/resources/statics/StaticResourceLoader.java

Issue 731133002: Upstream ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clang build failure Created 6 years 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 2014 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.ui.resources.statics;
6
7 import android.content.res.Resources;
8
9 import org.chromium.ui.resources.Resource;
10 import org.chromium.ui.resources.async.AsyncPreloadResourceLoader;
11
12 /**
13 * Handles loading Android resources from disk asynchronously and synchronously.
14 */
15 public class StaticResourceLoader extends AsyncPreloadResourceLoader {
16 /**
17 * Creates a {@link StaticResourceLoader}.
18 * @param resourceType The resource type this loader is responsible for load ing.
19 * @param callback The {@link ResourceLoaderCallback} to notify when a { @link Resource} is
20 * done loading.
21 * @param resources The {@link Resources} instance to load Android resour ces from.
22 */
23 public StaticResourceLoader(int resourceType, ResourceLoaderCallback callbac k,
24 final Resources resources) {
25 super(resourceType, callback, new ResourceCreator() {
26 @Override
27 public Resource create(int resId) {
28 return StaticResource.create(resources, resId, 0, 0);
29 }
30 });
31 }
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698