Chromium Code Reviews| Index: content/shell/android/java/org/chromium/content_shell/ContentShellActivity.java |
| diff --git a/content/shell/android/java/org/chromium/content_shell/ContentShellActivity.java b/content/shell/android/java/org/chromium/content_shell/ContentShellActivity.java |
| index a3a102820d26f0d65ccaafcdb8810d0ff2a8d45a..1e23ca6ce3e8599760ed453328efea8827837447 100644 |
| --- a/content/shell/android/java/org/chromium/content_shell/ContentShellActivity.java |
| +++ b/content/shell/android/java/org/chromium/content_shell/ContentShellActivity.java |
| @@ -7,11 +7,14 @@ package org.chromium.content_shell; |
| import android.app.Activity; |
| import android.content.Intent; |
| import android.os.Bundle; |
| +import android.os.Debug; |
| import android.text.TextUtils; |
| import android.util.Log; |
| import android.view.KeyEvent; |
| +import org.chromium.content.browser.CommandLine; |
| import org.chromium.content.browser.ContentView; |
| +import org.chromium.content.browser.LibraryLoader; |
| /** |
| * Activity for managing the Content Shell. |
| @@ -20,6 +23,7 @@ public class ContentShellActivity extends Activity { |
| private static final String COMMAND_LINE_FILE = "/data/local/content-shell-command-line"; |
| private static final String TAG = "ContentShellActivity"; |
| + private static final String NATIVE_LIBRARY = "content_shell_content_view"; |
| private ShellManager mShellManager; |
| @@ -28,17 +32,16 @@ public class ContentShellActivity extends Activity { |
| super.onCreate(savedInstanceState); |
| // Initializing the command line must occur before loading the library. |
| - // TODO(tedchoc): Initialize command line from file. |
| + CommandLine.initFromFile(COMMAND_LINE_FILE); |
| String startupUrl = getUrlFromIntent(getIntent()); |
| if (!TextUtils.isEmpty(startupUrl)) { |
| - // TODO(tedchoc): Append URL to command line. |
| + CommandLine.getInstance().appendSwitchesAndArguments( |
| + new String[] {ShellView.sanitizeUrl(startupUrl)}); |
| } |
| - // TODO(jrg,tedchoc): upstream the async library loader, then |
| - // make this call look like this: |
| - // LibraryLoader.loadAndInitSync(); |
| - loadNativeLibrary(); |
| - |
| + // Debug.waitForDebugger(); |
|
Ted C
2012/05/09 00:26:41
remove?
John Grabowski
2012/05/09 17:18:15
Not until we have command line support (for --wait
|
| + LibraryLoader.setLibraryToLoad(NATIVE_LIBRARY); |
|
Ted C
2012/05/09 00:26:41
specifying the library to load should go into Cont
|
| + LibraryLoader.loadAndInitSync(); |
| initializeContentViewResources(); |
| setContentView(R.layout.content_shell_activity); |
| @@ -93,18 +96,4 @@ public class ContentShellActivity extends Activity { |
| ContentView.registerPopupOverlayCornerRadius(0); |
| ContentView.registerPopupOverlayResourceId(R.drawable.popup_zoomer_overlay); |
| } |
| - |
| - |
| - private static final String NATIVE_LIBRARY = "content_shell_content_view"; |
| - |
| - private void loadNativeLibrary() throws UnsatisfiedLinkError { |
| - Log.i(TAG, "loading: " + NATIVE_LIBRARY); |
| - try { |
| - System.loadLibrary(NATIVE_LIBRARY); |
| - } catch (UnsatisfiedLinkError e) { |
| - Log.e(TAG, "Unable to load lib" + NATIVE_LIBRARY + ".so: " + e); |
| - throw e; |
| - } |
| - Log.i(TAG, "loaded: " + NATIVE_LIBRARY); |
| - } |
| } |