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

Unified Diff: mojo/python/content_handler/python_system_impl_helper.h

Issue 796373006: 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 side-by-side diff with in-line comments
Download patch
Index: mojo/python/content_handler/python_system_impl_helper.h
diff --git a/mojo/python/content_handler/python_system_impl_helper.h b/mojo/python/content_handler/python_system_impl_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..6d66236e2e1fb5650642a04800bc9f96777c390d
--- /dev/null
+++ b/mojo/python/content_handler/python_system_impl_helper.h
@@ -0,0 +1,44 @@
+// 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.
+
+#ifndef MOJO_PYTHON_CONTENT_HANDLER_PYTHON_SYSTEM_IMPL_HELPER_H_
+#define MOJO_PYTHON_CONTENT_HANDLER_PYTHON_SYSTEM_IMPL_HELPER_H_
+
+#include <Python.h>
+
+#include "base/base_export.h"
+#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
+#include "mojo/public/cpp/bindings/callback.h"
+#include "mojo/public/cpp/system/core.h"
+#include "mojo/public/python/src/common.h"
+
+namespace mojo {
+namespace python {
qsr 2015/01/12 17:37:45 Could you add a ban line here.
etiennej 2015/01/14 00:54:04 Done.
+// Run loop for python
+class PythonRunLoop {
+ public:
+ PythonRunLoop();
+
+ ~PythonRunLoop();
+
+ void Run();
+
+ void RunUntilIdle();
+
+ void Quit();
+
+ // Post a task to be executed roughtly after delay microseconds
+ void PostDelayedTask(PyObject* callable, int64 delay);
+ private:
+ base::MessageLoop loop_;
+};
+
+PythonAsyncWaiter* NewAsyncWaiter();
+
+} // namespace python
+} // namespace mojo
+
+#endif // MOJO_PYTHON_CONTENT_HANDLER_PYTHON_SYSTEM_IMPL_HELPER_H_
+

Powered by Google App Engine
This is Rietveld 408576698