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.content_shell_apk; | 5 package org.chromium.content_shell_apk; |
6 | 6 |
| 7 import android.app.Activity; |
7 import android.content.BroadcastReceiver; | 8 import android.content.BroadcastReceiver; |
8 import android.content.Context; | 9 import android.content.Context; |
9 import android.content.Intent; | 10 import android.content.Intent; |
10 import android.content.IntentFilter; | 11 import android.content.IntentFilter; |
11 import android.os.Bundle; | 12 import android.os.Bundle; |
12 import android.text.TextUtils; | 13 import android.text.TextUtils; |
13 import android.util.Log; | 14 import android.util.Log; |
14 import android.view.KeyEvent; | 15 import android.view.KeyEvent; |
15 import android.widget.Toast; | 16 import android.widget.Toast; |
16 | 17 |
17 import org.chromium.base.ChromiumActivity; | |
18 import org.chromium.base.MemoryPressureListener; | 18 import org.chromium.base.MemoryPressureListener; |
19 import org.chromium.content.app.LibraryLoader; | 19 import org.chromium.content.app.LibraryLoader; |
20 import org.chromium.content.browser.ActivityContentVideoViewClient; | 20 import org.chromium.content.browser.ActivityContentVideoViewClient; |
21 import org.chromium.content.browser.BrowserStartupController; | 21 import org.chromium.content.browser.BrowserStartupController; |
22 import org.chromium.content.browser.ContentVideoViewClient; | 22 import org.chromium.content.browser.ContentVideoViewClient; |
23 import org.chromium.content.browser.ContentView; | 23 import org.chromium.content.browser.ContentView; |
24 import org.chromium.content.browser.ContentViewClient; | 24 import org.chromium.content.browser.ContentViewClient; |
25 import org.chromium.content.browser.DeviceUtils; | 25 import org.chromium.content.browser.DeviceUtils; |
26 import org.chromium.content.browser.TracingIntentHandler; | 26 import org.chromium.content.browser.TracingIntentHandler; |
27 import org.chromium.content.common.CommandLine; | 27 import org.chromium.content.common.CommandLine; |
28 import org.chromium.content.common.ProcessInitException; | 28 import org.chromium.content.common.ProcessInitException; |
29 import org.chromium.content_shell.Shell; | 29 import org.chromium.content_shell.Shell; |
30 import org.chromium.content_shell.ShellManager; | 30 import org.chromium.content_shell.ShellManager; |
31 import org.chromium.ui.WindowAndroid; | 31 import org.chromium.ui.WindowAndroid; |
32 | 32 |
33 /** | 33 /** |
34 * Activity for managing the Content Shell. | 34 * Activity for managing the Content Shell. |
35 */ | 35 */ |
36 public class ContentShellActivity extends ChromiumActivity { | 36 public class ContentShellActivity extends Activity { |
37 | 37 |
38 public static final String COMMAND_LINE_FILE = "/data/local/tmp/content-shel
l-command-line"; | 38 public static final String COMMAND_LINE_FILE = "/data/local/tmp/content-shel
l-command-line"; |
39 private static final String TAG = "ContentShellActivity"; | 39 private static final String TAG = "ContentShellActivity"; |
40 | 40 |
41 private static final String ACTIVE_SHELL_URL_KEY = "activeUrl"; | 41 private static final String ACTIVE_SHELL_URL_KEY = "activeUrl"; |
42 private static final String ACTION_START_TRACE = | 42 private static final String ACTION_START_TRACE = |
43 "org.chromium.content_shell.action.PROFILE_START"; | 43 "org.chromium.content_shell.action.PROFILE_START"; |
44 private static final String ACTION_STOP_TRACE = | 44 private static final String ACTION_STOP_TRACE = |
45 "org.chromium.content_shell.action.PROFILE_STOP"; | 45 "org.chromium.content_shell.action.PROFILE_STOP"; |
46 public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs"; | 46 public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs"; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 /** | 269 /** |
270 * @return The {@link ContentView} owned by the currently visible {@link She
ll} or null if one | 270 * @return The {@link ContentView} owned by the currently visible {@link She
ll} or null if one |
271 * is not showing. | 271 * is not showing. |
272 */ | 272 */ |
273 public ContentView getActiveContentView() { | 273 public ContentView getActiveContentView() { |
274 Shell shell = getActiveShell(); | 274 Shell shell = getActiveShell(); |
275 return shell != null ? shell.getContentView() : null; | 275 return shell != null ? shell.getContentView() : null; |
276 } | 276 } |
277 } | 277 } |
OLD | NEW |