| Index: ui/android/java/src/org/chromium/ui/resources/statics/StaticResourceLoader.java
|
| diff --git a/ui/android/java/src/org/chromium/ui/resources/statics/StaticResourceLoader.java b/ui/android/java/src/org/chromium/ui/resources/statics/StaticResourceLoader.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3444188f4da9d0b4fa4a0d9449b0c4dd7e715e7c
|
| --- /dev/null
|
| +++ b/ui/android/java/src/org/chromium/ui/resources/statics/StaticResourceLoader.java
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package org.chromium.ui.resources.statics;
|
| +
|
| +import android.content.res.Resources;
|
| +
|
| +import org.chromium.ui.resources.Resource;
|
| +import org.chromium.ui.resources.async.AsyncPreloadResourceLoader;
|
| +
|
| +/**
|
| + * Handles loading Android resources from disk asynchronously and synchronously.
|
| + */
|
| +public class StaticResourceLoader extends AsyncPreloadResourceLoader {
|
| + /**
|
| + * Creates a {@link StaticResourceLoader}.
|
| + * @param resourceType The resource type this loader is responsible for loading.
|
| + * @param callback The {@link ResourceLoaderCallback} to notify when a {@link Resource} is
|
| + * done loading.
|
| + * @param resources The {@link Resources} instance to load Android resources from.
|
| + */
|
| + public StaticResourceLoader(int resourceType, ResourceLoaderCallback callback,
|
| + final Resources resources) {
|
| + super(resourceType, callback, new ResourceCreator() {
|
| + @Override
|
| + public Resource create(int resId) {
|
| + return StaticResource.create(resources, resId, 0, 0);
|
| + }
|
| + });
|
| + }
|
| +}
|
|
|