Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1377)

Unified Diff: content/shell/android/java/org/chromium/content_shell/ContentShellActivity.java

Issue 10223007: Package and load native library in content shell. Add content shell util scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nilesh tweak Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/android/content_shell_apk.xml ('k') | testing/android/native_test_apk.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a3a102820d26f0d65ccaafcdb8810d0ff2a8d45a 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 static final String TAG = "ContentShellActivity";
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 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);
+ }
}
« no previous file with comments | « content/shell/android/content_shell_apk.xml ('k') | testing/android/native_test_apk.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698