| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.blimp; | 5 package org.chromium.blimp; |
| 6 | 6 |
| 7 import android.app.Application; | 7 import android.app.Application; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 | 9 |
| 10 import org.chromium.base.BaseChromiumApplication; | 10 import org.chromium.base.BaseChromiumApplication; |
| 11 import org.chromium.base.CommandLineInitUtil; | 11 import org.chromium.base.CommandLineInitUtil; |
| 12 import org.chromium.base.ContextUtils; | 12 import org.chromium.base.ContextUtils; |
| 13 import org.chromium.base.PathUtils; | 13 import org.chromium.base.PathUtils; |
| 14 import org.chromium.base.ResourceExtractor; | |
| 15 | 14 |
| 16 /** | 15 /** |
| 17 * The {@link Application} for the Blimp client. | 16 * The {@link Application} for the Blimp client. |
| 18 */ | 17 */ |
| 19 public class BlimpApplication extends BaseChromiumApplication { | 18 public class BlimpApplication extends BaseChromiumApplication { |
| 20 private static final String COMMAND_LINE_FILE = "blimp-command-line"; | 19 private static final String COMMAND_LINE_FILE = "blimp-command-line"; |
| 21 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "blimp"; | 20 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "blimp"; |
| 22 | 21 |
| 23 @Override | 22 @Override |
| 24 protected void attachBaseContext(Context base) { | 23 protected void attachBaseContext(Context base) { |
| 25 super.attachBaseContext(base); | 24 super.attachBaseContext(base); |
| 26 ContextUtils.initApplicationContext(this); | 25 ContextUtils.initApplicationContext(this); |
| 26 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); |
| 27 } | 27 } |
| 28 | 28 |
| 29 @Override | 29 @Override |
| 30 public void onCreate() { | 30 public void onCreate() { |
| 31 super.onCreate(); | 31 super.onCreate(); |
| 32 ResourceExtractor.setResourcesToExtract(new ResourceExtractor.ResourceEn
try[0]); | |
| 33 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); | |
| 34 initCommandLine(); | 32 initCommandLine(); |
| 35 } | 33 } |
| 36 | 34 |
| 37 @Override | 35 @Override |
| 38 public void initCommandLine() { | 36 public void initCommandLine() { |
| 39 CommandLineInitUtil.initCommandLine(this, COMMAND_LINE_FILE); | 37 CommandLineInitUtil.initCommandLine(this, COMMAND_LINE_FILE); |
| 40 } | 38 } |
| 41 } | 39 } |
| OLD | NEW |