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.Activity; | 7 import android.app.Activity; |
8 import android.content.Intent; | 8 import android.content.Intent; |
9 import android.os.Bundle; | 9 import android.os.Bundle; |
10 import android.text.TextUtils; | 10 import android.text.TextUtils; |
11 import android.util.Log; | 11 import android.util.Log; |
12 import android.view.KeyEvent; | 12 import android.view.KeyEvent; |
13 | 13 |
| 14 import org.chromium.base.ChromiumActivity; |
14 import org.chromium.chrome.browser.DevToolsServer; | 15 import org.chromium.chrome.browser.DevToolsServer; |
15 import org.chromium.chrome.browser.TabBase; | 16 import org.chromium.chrome.browser.TabBase; |
16 import org.chromium.content.app.LibraryLoader; | 17 import org.chromium.content.app.LibraryLoader; |
17 import org.chromium.content.browser.ContentView; | 18 import org.chromium.content.browser.ContentView; |
18 import org.chromium.content.browser.DeviceUtils; | 19 import org.chromium.content.browser.DeviceUtils; |
19 import org.chromium.content.common.CommandLine; | 20 import org.chromium.content.common.CommandLine; |
20 import org.chromium.ui.gfx.ActivityNativeWindow; | 21 import org.chromium.ui.gfx.ActivityNativeWindow; |
21 | 22 |
22 /** | 23 /** |
23 * The {@link Activity} component of a basic test shell to test Chrome features. | 24 * The {@link Activity} component of a basic test shell to test Chrome features. |
24 */ | 25 */ |
25 public class ChromiumTestShellActivity extends Activity { | 26 public class ChromiumTestShellActivity extends ChromiumActivity { |
26 private static final String TAG = ChromiumTestShellActivity.class.getCanonic
alName(); | 27 private static final String TAG = ChromiumTestShellActivity.class.getCanonic
alName(); |
27 private static final String COMMAND_LINE_FILE = | 28 private static final String COMMAND_LINE_FILE = |
28 "/data/local/tmp/chromium-testshell-command-line"; | 29 "/data/local/tmp/chromium-testshell-command-line"; |
29 | 30 |
30 private ActivityNativeWindow mWindow; | 31 private ActivityNativeWindow mWindow; |
31 private TabManager mTabManager; | 32 private TabManager mTabManager; |
32 private DevToolsServer mDevToolsServer; | 33 private DevToolsServer mDevToolsServer; |
33 | 34 |
34 @Override | 35 @Override |
35 protected void onCreate(Bundle savedInstanceState) { | 36 protected void onCreate(Bundle savedInstanceState) { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 Log.e(TAG, "Waiting for Java debugger to connect..."); | 135 Log.e(TAG, "Waiting for Java debugger to connect..."); |
135 android.os.Debug.waitForDebugger(); | 136 android.os.Debug.waitForDebugger(); |
136 Log.e(TAG, "Java debugger connected. Resuming execution."); | 137 Log.e(TAG, "Java debugger connected. Resuming execution."); |
137 } | 138 } |
138 } | 139 } |
139 | 140 |
140 private static String getUrlFromIntent(Intent intent) { | 141 private static String getUrlFromIntent(Intent intent) { |
141 return intent != null ? intent.getDataString() : null; | 142 return intent != null ? intent.getDataString() : null; |
142 } | 143 } |
143 } | 144 } |
OLD | NEW |