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

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

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/python/content_handler/python_system_impl_helper.h ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/python/content_handler/python_system_impl_helper.cc
diff --git a/mojo/python/content_handler/python_system_impl_helper.cc b/mojo/python/content_handler/python_system_impl_helper.cc
deleted file mode 100644
index 68887e3ad761c6e1ded7469b731c1648284e3864..0000000000000000000000000000000000000000
--- a/mojo/python/content_handler/python_system_impl_helper.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2013 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.
-
-#include "python_system_impl_helper.h"
-
-#include <Python.h>
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "mojo/common/message_pump_mojo.h"
-#include "mojo/public/python/src/common.h"
-
-namespace {
-class QuitCurrentRunLoop : public mojo::Closure::Runnable {
- public:
- void Run() const override {
- base::MessageLoop::current()->Quit();
- }
-
- static mojo::Closure::Runnable* NewInstance() {
- return new QuitCurrentRunLoop();
- }
-};
-
-} // namespace
-namespace mojo {
-namespace python {
-
-PythonRunLoop::PythonRunLoop() : loop_(common::MessagePumpMojo::Create()) {
-}
-
-PythonRunLoop::~PythonRunLoop() {
-}
-
-void PythonRunLoop::Run() {
- loop_.Run();
-}
-
-void PythonRunLoop::RunUntilIdle() {
- loop_.RunUntilIdle();
-}
-
-void PythonRunLoop::Quit() {
- loop_.Quit();
-}
-
-void PythonRunLoop::PostDelayedTask(PyObject* callable, MojoTimeTicks delay) {
- Closure::Runnable* quit_runnable =
- NewRunnableFromCallable(callable, loop_.QuitClosure());
-
- loop_.PostDelayedTask(
- FROM_HERE, base::Bind(&mojo::Closure::Run,
- base::Owned(new mojo::Closure(quit_runnable))),
- base::TimeDelta::FromMicroseconds(delay));
-}
-
-PythonAsyncWaiter* NewAsyncWaiter() {
- return new PythonAsyncWaiter(
- mojo::Closure(QuitCurrentRunLoop::NewInstance()));
-}
-
-} // namespace python
-} // namespace mojo
« no previous file with comments | « mojo/python/content_handler/python_system_impl_helper.h ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698