OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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.content_shell_apk; | 5 package org.chromium.chromecast.shell; |
6 | 6 |
7 import org.chromium.base.PathUtils; | 7 import org.chromium.base.PathUtils; |
8 import org.chromium.content.app.ContentApplication; | 8 import org.chromium.content.app.ContentApplication; |
9 import org.chromium.content.browser.ResourceExtractor; | 9 import org.chromium.content.browser.ResourceExtractor; |
10 | 10 |
11 /** | 11 /** |
12 * Entry point for the content shell application. Handles initialization of inf
ormation that needs | 12 * Entry point for the media shell application. Handles initialization of infor
mation that needs |
13 * to be shared across the main activity and the child services created. | 13 * to be shared across the main activity and the child services created. |
| 14 * |
| 15 * Note that this gets run for each process, including sandboxed child render pr
ocesses. Child |
| 16 * processes don't need most of the full "setup" performed in CastBrowserHelper.
java, but they do |
| 17 * require a few basic pieces (found here). |
14 */ | 18 */ |
15 public class ContentShellApplication extends ContentApplication { | 19 public class CastApplication extends ContentApplication { |
16 /** | 20 |
17 * icudtl.dat provides ICU (i18n library) with all the data for its | 21 private static final String[] MANDATORY_PAK_FILES = new String[] {"cast_shel
l.pak"}; |
18 * operation. We use to link it statically to our binary, but not any more | 22 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "cast_shell"; |
19 * so that we have to install it along with other mandatory pak files. | |
20 * See src/third_party/icu/README.chromium. | |
21 */ | |
22 private static final String[] MANDATORY_PAK_FILES = new String[] { | |
23 "content_shell.pak", | |
24 "icudtl.dat" | |
25 }; | |
26 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "content_shell"; | |
27 | 23 |
28 @Override | 24 @Override |
29 public void onCreate() { | 25 public void onCreate() { |
30 super.onCreate(); | 26 super.onCreate(); |
31 initializeApplicationParameters(); | 27 initializeApplicationParameters(); |
32 } | 28 } |
33 | 29 |
34 public static void initializeApplicationParameters() { | 30 public static void initializeApplicationParameters() { |
35 ResourceExtractor.setMandatoryPaksToExtract(MANDATORY_PAK_FILES); | 31 ResourceExtractor.setMandatoryPaksToExtract(MANDATORY_PAK_FILES); |
36 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); | 32 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); |
37 } | 33 } |
38 | 34 |
39 } | 35 } |
OLD | NEW |