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

Unified Diff: mojo/python/system/mojo/embedder.pyx

Issue 377293002: Core mojo API for python. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try to fix timing unit tests Created 6 years, 4 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
Index: mojo/python/system/mojo/embedder.pyx
diff --git a/mojo/python/system/mojo/embedder.pyx b/mojo/python/system/mojo/embedder.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..617fce11cd0a294ed8aadf19694691d464230876
--- /dev/null
+++ b/mojo/python/system/mojo/embedder.pyx
@@ -0,0 +1,22 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# distutils: language = c++
+
+from libc.stdint cimport uintptr_t
+
+from mojo import system
+
+cdef extern from "mojo/embedder/embedder.h" nogil:
+ cdef void InitCEmbedder "mojo::embedder::Init"()
+
+cdef extern from "mojo/public/platform/native/system_thunks.h" nogil:
+ cdef struct MojoSystemThunks:
+ pass
+ cdef MojoSystemThunks MojoMakeSystemThunks()
+
+def init():
+ InitCEmbedder()
+ cdef MojoSystemThunks thunks = MojoMakeSystemThunks()
+ system.set_system_thunks(<uintptr_t>(&thunks))

Powered by Google App Engine
This is Rietveld 408576698