Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / android_webview / test / shell / src / org / chromium / android_webview / shell / AwShellResourceProvider.java
1 // Copyright 2012 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.android_webview.shell;
6
7 import android.content.Context;
8
9 import org.chromium.android_webview.AwResource;
10
11 /**
12  * Registers resources for the Android webview shell.
13  */
14 public class AwShellResourceProvider {
15     private static boolean sInitialized;
16
17     public static void registerResources(Context context) {
18         if (sInitialized) {
19             return;
20         }
21
22         AwResource.setResources(context.getResources());
23
24         AwResource.setErrorPageResources(R.raw.error, R.raw.blank_html);
25
26         AwResource.setDefaultTextEncoding(R.string.default_encoding);
27
28         sInitialized = true;
29     }
30 }