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 #ifndef MOJO_PUBLIC_PYTHON_SRC_COMMON_H_ | 5 #ifndef MOJO_PUBLIC_PYTHON_SRC_COMMON_H_ |
6 #define MOJO_PUBLIC_PYTHON_SRC_COMMON_H_ | 6 #define MOJO_PUBLIC_PYTHON_SRC_COMMON_H_ |
7 | 7 |
8 #include <Python.h> | 8 #include <Python.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 ScopedPyRef& operator=(const ScopedPyRef& other); | 49 ScopedPyRef& operator=(const ScopedPyRef& other); |
50 | 50 |
51 private: | 51 private: |
52 PyObject* object_; | 52 PyObject* object_; |
53 }; | 53 }; |
54 | 54 |
55 | 55 |
56 class PythonClosure : public mojo::Closure::Runnable { | 56 class PythonClosure : public mojo::Closure::Runnable { |
57 public: | 57 public: |
58 PythonClosure(PyObject* callable, const mojo::Closure& quit); | 58 PythonClosure(PyObject* callable, const mojo::Closure& quit); |
59 ~PythonClosure(); | 59 ~PythonClosure() override; |
60 | 60 |
61 void Run() const override; | 61 void Run() const override; |
62 | 62 |
63 private: | 63 private: |
64 ScopedPyRef callable_; | 64 ScopedPyRef callable_; |
65 const mojo::Closure quit_; | 65 const mojo::Closure quit_; |
66 | 66 |
67 MOJO_DISALLOW_COPY_AND_ASSIGN(PythonClosure); | 67 MOJO_DISALLOW_COPY_AND_ASSIGN(PythonClosure); |
68 }; | 68 }; |
69 | 69 |
(...skipping 28 matching lines...) Expand all Loading... |
98 const mojo::Closure quit_; | 98 const mojo::Closure quit_; |
99 | 99 |
100 MOJO_DISALLOW_COPY_AND_ASSIGN(PythonAsyncWaiter); | 100 MOJO_DISALLOW_COPY_AND_ASSIGN(PythonAsyncWaiter); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace python | 103 } // namespace python |
104 } // namespace mojo | 104 } // namespace mojo |
105 | 105 |
106 #endif // MOJO_PUBLIC_PYTHON_SRC_COMMON_H_ | 106 #endif // MOJO_PUBLIC_PYTHON_SRC_COMMON_H_ |
107 | 107 |
OLD | NEW |