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

Side by Side 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: Fix dependency issue Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/python/BUILD.gn ('k') | mojo/python/tests/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # distutils: language = c++
6
7 from libc.stdint cimport uintptr_t
8
9 from mojo import system
10
11 cdef extern from "third_party/cython/python_export.h":
12 pass
13
14 cdef extern from "base/memory/scoped_ptr.h":
15 cdef cppclass scoped_ptr[T]:
16 scoped_ptr(T*)
17
18 cdef extern from "mojo/embedder/platform_support.h" \
19 namespace "mojo::embedder" nogil:
20 cdef cppclass PlatformSupport:
21 pass
22
23 cdef extern from "mojo/embedder/simple_platform_support.h" \
24 namespace "mojo::embedder" nogil:
25 cdef cppclass SimplePlatformSupport(PlatformSupport):
26 SimplePlatformSupport()
27
28 cdef extern from "mojo/embedder/embedder.h" nogil:
29 cdef void InitCEmbedder "mojo::embedder::Init"(
30 scoped_ptr[PlatformSupport] platform_support)
31
32 cdef extern from "mojo/public/platform/native/system_thunks.h" nogil:
33 cdef struct MojoSystemThunks:
34 pass
35 cdef MojoSystemThunks MojoMakeSystemThunks()
36
37 def init():
38 InitCEmbedder(scoped_ptr[PlatformSupport](
39 new SimplePlatformSupport()))
40 cdef MojoSystemThunks thunks = MojoMakeSystemThunks()
41 system.set_system_thunks(<uintptr_t>(&thunks))
OLDNEW
« no previous file with comments | « mojo/python/BUILD.gn ('k') | mojo/python/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698