| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # distutils: language = c++ | 5 # distutils: language = c++ |
| 6 | 6 |
| 7 from libc.stdint cimport uintptr_t | 7 from libc.stdint cimport uintptr_t |
| 8 from libcpp cimport bool | 8 from libcpp cimport bool |
| 9 | 9 |
| 10 from mojo import system | 10 import mojo_system |
| 11 from mojo import system_impl | 11 import mojo_system_impl |
| 12 | 12 |
| 13 cdef extern from "third_party/cython/python_export.h": | 13 cdef extern from "third_party/cython/python_export.h": |
| 14 pass | 14 pass |
| 15 | 15 |
| 16 cdef extern from "base/memory/scoped_ptr.h": | 16 cdef extern from "base/memory/scoped_ptr.h": |
| 17 cdef cppclass scoped_ptr[T]: | 17 cdef cppclass scoped_ptr[T]: |
| 18 scoped_ptr(T*) | 18 scoped_ptr(T*) |
| 19 | 19 |
| 20 cdef extern from "mojo/edk/embedder/platform_support.h" \ | 20 cdef extern from "mojo/edk/embedder/platform_support.h" \ |
| 21 namespace "mojo::embedder" nogil: | 21 namespace "mojo::embedder" nogil: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 36 pass | 36 pass |
| 37 cdef MojoSystemThunks MojoMakeSystemThunks() | 37 cdef MojoSystemThunks MojoMakeSystemThunks() |
| 38 | 38 |
| 39 cdef extern from "mojo/edk/embedder/test_embedder.h" nogil: | 39 cdef extern from "mojo/edk/embedder/test_embedder.h" nogil: |
| 40 cdef bool ShutdownCEmbedderForTest "mojo::embedder::test::Shutdown"() | 40 cdef bool ShutdownCEmbedderForTest "mojo::embedder::test::Shutdown"() |
| 41 | 41 |
| 42 def Init(): | 42 def Init(): |
| 43 InitCEmbedder(scoped_ptr[PlatformSupport]( | 43 InitCEmbedder(scoped_ptr[PlatformSupport]( |
| 44 new SimplePlatformSupport())) | 44 new SimplePlatformSupport())) |
| 45 cdef MojoSystemThunks thunks = MojoMakeSystemThunks() | 45 cdef MojoSystemThunks thunks = MojoMakeSystemThunks() |
| 46 system.SetSystemThunks(<uintptr_t>(&thunks)) | 46 mojo_system.SetSystemThunks(<uintptr_t>(&thunks)) |
| 47 system_impl.SetSystemThunks(<uintptr_t>(&thunks)) | 47 mojo_system_impl.SetSystemThunks(<uintptr_t>(&thunks)) |
| 48 | 48 |
| 49 def ShutdownForTest(): | 49 def ShutdownForTest(): |
| 50 return ShutdownCEmbedderForTest() | 50 return ShutdownCEmbedderForTest() |
| OLD | NEW |