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 837656130cbf9e2ba9766015066babf7311a446e..9ba86d4db4ee1ab6240d06e086cc73d3ef9908c2 100644 |
| --- a/content/shell/android/java/org/chromium/content_shell/ContentShellActivity.java |
| +++ b/content/shell/android/java/org/chromium/content_shell/ContentShellActivity.java |
| @@ -8,6 +8,7 @@ import android.app.Activity; |
| import android.content.Intent; |
| import android.os.Bundle; |
| import android.text.TextUtils; |
| +import android.util.Log; |
| import android.view.KeyEvent; |
| import org.chromium.content.browser.ContentView; |
| @@ -18,6 +19,7 @@ import org.chromium.content.browser.ContentView; |
| public class ContentShellActivity extends Activity { |
| private static final String COMMAND_LINE_FILE = "/data/local/content-shell-command-line"; |
| + private final String TAG = "ContentShellActivity"; |
|
Yaron
2012/04/25 20:25:57
static
John Grabowski
2012/04/25 20:41:01
Done.
|
| private ShellManager mShellManager; |
| @@ -32,7 +34,11 @@ public class ContentShellActivity extends Activity { |
| // TODO(tedchoc): Append URL to command line. |
| } |
| - // TODO(tedchoc): Load the native library. |
| + // TODO(jrg,tedchoc): upstream the async library loader, then |
| + // make this call look like this: |
| + // LibraryLoader.loadAndInitSync(); |
| + loadNativeLibrary(); |
| + |
| initializeContentViewResources(); |
| setContentView(R.layout.content_shell_activity); |
| @@ -87,4 +93,18 @@ public class ContentShellActivity extends Activity { |
| ContentView.registerPopupOverlayCornerRadius(0); |
| ContentView.registerPopupOverlayResourceId(R.drawable.popup_zoomer_overlay); |
| } |
| + |
| + |
| + private static final String sNativeLibrary = "content_shell_content_view"; |
|
Yaron
2012/04/25 20:25:57
since it's constant/final, just make it NATIVE_LIB
John Grabowski
2012/04/25 20:41:01
Done.
|
| + |
| + private void loadNativeLibrary() throws UnsatisfiedLinkError { |
| + Log.i(TAG, "loading: " + sNativeLibrary); |
| + try { |
| + System.loadLibrary(sNativeLibrary); |
| + } catch (UnsatisfiedLinkError e) { |
| + Log.e(TAG, "Unable to load lib" + sNativeLibrary + ".so: " + e); |
| + throw e; |
| + } |
| + Log.i(TAG, "loaded: " + sNativeLibrary); |
| + } |
| } |