| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.android_webview.shell; | 5 package org.chromium.android_webview.shell; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.content.Intent; | 9 import android.content.Intent; |
| 10 import android.content.SharedPreferences; | 10 import android.content.SharedPreferences; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 import android.widget.TextView.OnEditorActionListener; | 29 import android.widget.TextView.OnEditorActionListener; |
| 30 | 30 |
| 31 import org.chromium.android_webview.AwBrowserContext; | 31 import org.chromium.android_webview.AwBrowserContext; |
| 32 import org.chromium.android_webview.AwBrowserProcess; | 32 import org.chromium.android_webview.AwBrowserProcess; |
| 33 import org.chromium.android_webview.AwContents; | 33 import org.chromium.android_webview.AwContents; |
| 34 import org.chromium.android_webview.AwContentsClient; | 34 import org.chromium.android_webview.AwContentsClient; |
| 35 import org.chromium.android_webview.AwDevToolsServer; | 35 import org.chromium.android_webview.AwDevToolsServer; |
| 36 import org.chromium.android_webview.AwSettings; | 36 import org.chromium.android_webview.AwSettings; |
| 37 import org.chromium.android_webview.test.AwTestContainerView; | 37 import org.chromium.android_webview.test.AwTestContainerView; |
| 38 import org.chromium.android_webview.test.NullContentsClient; | 38 import org.chromium.android_webview.test.NullContentsClient; |
| 39 import org.chromium.content.browser.LoadUrlParams; | 39 import org.chromium.content_public.browser.LoadUrlParams; |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * This is a lightweight activity for tests that only require WebView functional
ity. | 42 * This is a lightweight activity for tests that only require WebView functional
ity. |
| 43 */ | 43 */ |
| 44 public class AwShellActivity extends Activity { | 44 public class AwShellActivity extends Activity { |
| 45 private static final String PREFERENCES_NAME = "AwShellPrefs"; | 45 private static final String PREFERENCES_NAME = "AwShellPrefs"; |
| 46 private static final String INITIAL_URL = "about:blank"; | 46 private static final String INITIAL_URL = "about:blank"; |
| 47 private AwBrowserContext mBrowserContext; | 47 private AwBrowserContext mBrowserContext; |
| 48 private AwDevToolsServer mDevToolsServer; | 48 private AwDevToolsServer mDevToolsServer; |
| 49 private AwTestContainerView mAwTestContainerView; | 49 private AwTestContainerView mAwTestContainerView; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 if (keyCode == KeyEvent.KEYCODE_BACK) { | 215 if (keyCode == KeyEvent.KEYCODE_BACK) { |
| 216 if (mAwTestContainerView.getContentViewCore().canGoBack()) { | 216 if (mAwTestContainerView.getContentViewCore().canGoBack()) { |
| 217 mAwTestContainerView.getContentViewCore().goBack(); | 217 mAwTestContainerView.getContentViewCore().goBack(); |
| 218 return true; | 218 return true; |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 return super.onKeyUp(keyCode, event); | 222 return super.onKeyUp(keyCode, event); |
| 223 } | 223 } |
| 224 } | 224 } |
| OLD | NEW |