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

Unified Diff: examples/device_name/device_name.cc

Issue 772393003: Android handler: inject the application loading part from the shell .so. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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 | « no previous file | mojo/shell/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/device_name/device_name.cc
diff --git a/examples/device_name/device_name.cc b/examples/device_name/device_name.cc
index eb219e9ee2b1342ed5bbc400402720e97efda7ba..9498671e4c425ae81f534e8d43422f6449783ec8 100644
--- a/examples/device_name/device_name.cc
+++ b/examples/device_name/device_name.cc
@@ -26,6 +26,7 @@
#include "base/android/jni_string.h"
#include "jni/DeviceName_jni.h"
#include "mojo/public/c/system/main.h"
+#include "mojo/public/cpp/system/core.h"
namespace mojo {
@@ -58,6 +59,12 @@ MojoResult MojoMain(MojoHandle shell_handle) {
LOG(INFO) << "Device name: " << mojo::examples::GetDeviceName();
LOG(INFO) << "Application class: "
<< mojo::examples::GetApplicationClassName();
+
+ // Call a core function to demonstrate that the thunks were properly set.
ppi 2014/12/03 12:30:24 Ben, is it possible to do it more concisely than i
qsr 2014/12/03 12:38:33 Yes, and no. I would use MojoGetTimeTicksNow() ins
ppi 2014/12/03 13:06:05 Thanks, done.
+ mojo::ScopedMessagePipeHandle handle_a;
+ mojo::ScopedMessagePipeHandle handle_b;
+ CreateMessagePipe(NULL, &handle_a, &handle_b);
+ LOG(INFO) << "All looks good.";
return MOJO_RESULT_OK;
}
« no previous file with comments | « no previous file | mojo/shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698