CastApplication.java revision 1320f92c476a1ad9d19dba2a48c72b75566198e9
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 5package org.chromium.chromecast.shell; 6 7import org.chromium.base.PathUtils; 8import org.chromium.base.ResourceExtractor; 9import org.chromium.content.app.ContentApplication; 10 11/** 12 * Entry point for the Android cast shell application. Handles initialization of information that 13 * needs 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 processes. 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). 18 */ 19public class CastApplication extends ContentApplication { 20 21 private static final String[] MANDATORY_PAK_FILES = new String[] {"cast_shell.pak"}; 22 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "cast_shell"; 23 24 @Override 25 public void onCreate() { 26 super.onCreate(); 27 initializeApplicationParameters(); 28 } 29 30 public static void initializeApplicationParameters() { 31 ResourceExtractor.setMandatoryPaksToExtract(MANDATORY_PAK_FILES); 32 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); 33 } 34 35} 36