| 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 #include <dlfcn.h> | 5 #include <dlfcn.h> |
| 6 #include <python2.7/Python.h> | 6 #include <python2.7/Python.h> |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 extern "C" { | 27 extern "C" { |
| 28 void initmojo_system(); | 28 void initmojo_system(); |
| 29 void initmojo_system_impl(); | 29 void initmojo_system_impl(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace services { | 32 namespace services { |
| 33 namespace python { | 33 namespace python { |
| 34 namespace content_handler { | 34 namespace content_handler { |
| 35 | 35 |
| 36 using mojo::Application; | 36 using mojo::Application; |
| 37 using mojo::ApplicationConnection; | |
| 38 using mojo::ApplicationDelegate; | 37 using mojo::ApplicationDelegate; |
| 39 using mojo::ContentHandlerFactory; | 38 using mojo::ContentHandlerFactory; |
| 40 using mojo::InterfaceRequest; | 39 using mojo::InterfaceRequest; |
| 41 using mojo::ScopedDataPipeConsumerHandle; | 40 using mojo::ScopedDataPipeConsumerHandle; |
| 42 using mojo::URLResponsePtr; | 41 using mojo::URLResponsePtr; |
| 43 using mojo::python::ScopedPyRef; | 42 using mojo::python::ScopedPyRef; |
| 44 | 43 |
| 45 class PythonContentHandler : public ContentHandlerFactory::Delegate { | 44 class PythonContentHandler : public ContentHandlerFactory::Delegate { |
| 46 public: | 45 public: |
| 47 PythonContentHandler(bool debug) : debug_(debug) {} | 46 PythonContentHandler(bool debug) : debug_(debug) {} |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 244 |
| 246 } // namespace content_handler | 245 } // namespace content_handler |
| 247 } // namespace python | 246 } // namespace python |
| 248 } // namespace services | 247 } // namespace services |
| 249 | 248 |
| 250 MojoResult MojoMain(MojoHandle application_request) { | 249 MojoResult MojoMain(MojoHandle application_request) { |
| 251 mojo::ApplicationRunnerChromium runner( | 250 mojo::ApplicationRunnerChromium runner( |
| 252 new services::python::content_handler::PythonContentHandlerApp()); | 251 new services::python::content_handler::PythonContentHandlerApp()); |
| 253 return runner.Run(application_request); | 252 return runner.Run(application_request); |
| 254 } | 253 } |
| OLD | NEW |