| 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; | 5 package org.chromium.content_shell; |
| 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.content.app.LibraryLoader; | 15 import org.chromium.content.app.LibraryLoader; |
| 15 import org.chromium.content.browser.ActivityContentVideoViewDelegate; | 16 import org.chromium.content.browser.ActivityContentVideoViewDelegate; |
| 16 import org.chromium.content.browser.ContentVideoView; | 17 import org.chromium.content.browser.ContentVideoView; |
| 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 * Activity for managing the Content Shell. | 24 * Activity for managing the Content Shell. |
| 24 */ | 25 */ |
| 25 public class ContentShellActivity extends Activity { | 26 public class ContentShellActivity extends ChromiumActivity { |
| 26 | 27 |
| 27 public static final String COMMAND_LINE_FILE = "/data/local/tmp/content-shel
l-command-line"; | 28 public static final String COMMAND_LINE_FILE = "/data/local/tmp/content-shel
l-command-line"; |
| 28 private static final String TAG = ContentShellActivity.class.getName(); | 29 private static final String TAG = ContentShellActivity.class.getName(); |
| 29 | 30 |
| 30 private static final String ACTIVE_SHELL_URL_KEY = "activeUrl"; | 31 private static final String ACTIVE_SHELL_URL_KEY = "activeUrl"; |
| 31 public static final String DEFAULT_SHELL_URL = "http://www.google.com"; | 32 public static final String DEFAULT_SHELL_URL = "http://www.google.com"; |
| 32 public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs"; | 33 public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs"; |
| 33 | 34 |
| 34 private ShellManager mShellManager; | 35 private ShellManager mShellManager; |
| 35 private ActivityNativeWindow mActivityNativeWindow; | 36 private ActivityNativeWindow mActivityNativeWindow; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 170 |
| 170 /** | 171 /** |
| 171 * @return The {@link ContentView} owned by the currently visible {@link She
ll} or null if one | 172 * @return The {@link ContentView} owned by the currently visible {@link She
ll} or null if one |
| 172 * is not showing. | 173 * is not showing. |
| 173 */ | 174 */ |
| 174 public ContentView getActiveContentView() { | 175 public ContentView getActiveContentView() { |
| 175 Shell shell = getActiveShell(); | 176 Shell shell = getActiveShell(); |
| 176 return shell != null ? shell.getContentView() : null; | 177 return shell != null ? shell.getContentView() : null; |
| 177 } | 178 } |
| 178 } | 179 } |
| OLD | NEW |