Chromium Code Reviews| Index: chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java |
| diff --git a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..db4a55a164299691f3c21bfa508232881e5525ac |
| --- /dev/null |
| +++ b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java |
| @@ -0,0 +1,45 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.chrome.testshell; |
| + |
| +import android.app.Activity; |
| +import android.os.Bundle; |
| +import android.util.Log; |
| + |
| +import org.chromium.content.app.LibraryLoader; |
| +import org.chromium.content.browser.ContentView; |
| +import org.chromium.content.common.CommandLine; |
| + |
| +/** |
| + * The {@link Activity} component of a basic test shell to test Chrome features. |
| + */ |
| +public class ChromiumTestShellActivity extends Activity { |
| + private static final String TAG = ChromiumTestShellActivity.class.getCanonicalName(); |
| + private static final String COMMAND_LINE_FILE = "/data/local/tmp/chrome-command-line"; |
|
Ted C
2012/09/11 00:10:05
should this be chrome-test-shell-command-line or s
David Trainor- moved to gerrit
2012/09/11 00:25:04
Done.
|
| + |
| + @Override |
| + protected void onCreate(Bundle savedInstanceState) { |
| + super.onCreate(savedInstanceState); |
| + |
| + if (!CommandLine.isInitialized()) CommandLine.initFromFile(COMMAND_LINE_FILE); |
| + waitForDebuggerIfNeeded(); |
| + |
| + LibraryLoader.loadAndInitSync(); |
| + initializeContentViewResources(); |
| + |
| + ContentView.initChromiumBrowserProcess(this, ContentView.MAX_RENDERERS_AUTOMATIC); |
| + } |
| + |
| + private void waitForDebuggerIfNeeded() { |
| + if (CommandLine.getInstance().hasSwitch(CommandLine.WAIT_FOR_JAVA_DEBUGGER)) { |
| + Log.e(TAG, "Waiting for Java debugger to connect..."); |
| + android.os.Debug.waitForDebugger(); |
| + Log.e(TAG, "Java debugger connected. Resuming execution."); |
| + } |
| + } |
| + |
| + private void initializeContentViewResources() { |
| + } |
| +} |