OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.chrome.testshell; | 5 package org.chromium.chrome.testshell; |
6 | 6 |
7 import android.app.Application; | |
8 import android.content.Intent; | 7 import android.content.Intent; |
9 | 8 |
| 9 import org.chromium.base.ChromiumApplication; |
10 import org.chromium.base.PathUtils; | 10 import org.chromium.base.PathUtils; |
11 import org.chromium.chrome.browser.UmaUtils; | 11 import org.chromium.chrome.browser.UmaUtils; |
12 import org.chromium.content.browser.ResourceExtractor; | 12 import org.chromium.content.browser.ResourceExtractor; |
13 import org.chromium.content.common.CommandLine; | 13 import org.chromium.content.common.CommandLine; |
14 | 14 |
15 import java.util.ArrayList; | 15 import java.util.ArrayList; |
16 | 16 |
17 /** | 17 /** |
18 * A basic test shell {@link Application}. Handles setting up the native librar
y and | 18 * A basic test shell {@link android.app.Application}. Handles setting up the n
ative library and |
19 * loading the right resources. | 19 * loading the right resources. |
20 */ | 20 */ |
21 public class ChromiumTestShellApplication extends Application { | 21 public class ChromiumTestShellApplication extends ChromiumApplication { |
22 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "chromiumtestshe
ll"; | 22 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "chromiumtestshe
ll"; |
23 private static final String[] CHROME_MANDATORY_PAKS = { | 23 private static final String[] CHROME_MANDATORY_PAKS = { |
24 "en-US.pak", | 24 "en-US.pak", |
25 "resources.pak", | 25 "resources.pak", |
26 "chrome_100_percent.pak", | 26 "chrome_100_percent.pak", |
27 }; | 27 }; |
28 private static final String COMMAND_LINE_FILE = | 28 private static final String COMMAND_LINE_FILE = |
29 "/data/local/tmp/chromium-testshell-command-line"; | 29 "/data/local/tmp/chromium-testshell-command-line"; |
30 | 30 |
31 ArrayList<ChromiumTestShellApplicationObserver> mObservers; | 31 ArrayList<ChromiumTestShellApplicationObserver> mObservers; |
(...skipping 28 matching lines...) Expand all Loading... |
60 | 60 |
61 public void removeObserver(ChromiumTestShellApplicationObserver observer) { | 61 public void removeObserver(ChromiumTestShellApplicationObserver observer) { |
62 mObservers.remove(observer); | 62 mObservers.remove(observer); |
63 } | 63 } |
64 | 64 |
65 public static void initCommandLine() { | 65 public static void initCommandLine() { |
66 if (!CommandLine.isInitialized()) | 66 if (!CommandLine.isInitialized()) |
67 CommandLine.initFromFile(COMMAND_LINE_FILE); | 67 CommandLine.initFromFile(COMMAND_LINE_FILE); |
68 } | 68 } |
69 } | 69 } |
OLD | NEW |