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

Side by Side Diff: mojo/public/python/src/common.h

Issue 855043003: Revert "Content handler for python." (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « mojo/public/python/rules.gni ('k') | mojo/public/python/src/common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 kAcquire, 33 kAcquire,
34 }; 34 };
35 35
36 class ScopedPyRef { 36 class ScopedPyRef {
37 public: 37 public:
38 explicit ScopedPyRef(PyObject* object); 38 explicit ScopedPyRef(PyObject* object);
39 ScopedPyRef(PyObject* object, ScopedPyRefAcquire); 39 ScopedPyRef(PyObject* object, ScopedPyRefAcquire);
40 40
41 ~ScopedPyRef(); 41 ~ScopedPyRef();
42 42
43 // Releases ownership of the python object contained by this instance.
44 PyObject* Release();
45
46 operator PyObject*() const; 43 operator PyObject*() const;
47 44
48 private: 45 private:
49 PyObject* object_; 46 PyObject* object_;
50 47
51 MOJO_DISALLOW_COPY_AND_ASSIGN(ScopedPyRef); 48 MOJO_DISALLOW_COPY_AND_ASSIGN(ScopedPyRef);
52 }; 49 };
53 50
54 51
55 class PythonClosure : public mojo::Closure::Runnable { 52 class PythonClosure : public mojo::Closure::Runnable {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const mojo::Closure quit_; 94 const mojo::Closure quit_;
98 95
99 MOJO_DISALLOW_COPY_AND_ASSIGN(PythonAsyncWaiter); 96 MOJO_DISALLOW_COPY_AND_ASSIGN(PythonAsyncWaiter);
100 }; 97 };
101 98
102 } // namespace python 99 } // namespace python
103 } // namespace mojo 100 } // namespace mojo
104 101
105 #endif // MOJO_PUBLIC_PYTHON_SRC_COMMON_H_ 102 #endif // MOJO_PUBLIC_PYTHON_SRC_COMMON_H_
106 103
OLDNEW
« no previous file with comments | « mojo/public/python/rules.gni ('k') | mojo/public/python/src/common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698