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

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

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
Patch Set: fix android 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/content_handler_main.cc
diff --git a/mojo/python/content_handler/content_handler_main.cc b/mojo/python/content_handler/content_handler_main.cc
index aae4038778652e22b88be1914d260d68b263fa09..30e5175b073ceaa35ab990373e30f59544af234f 100644
--- a/mojo/python/content_handler/content_handler_main.cc
+++ b/mojo/python/content_handler/content_handler_main.cc
@@ -99,7 +99,8 @@ class PythonContentHandler : public ApplicationDelegate,
}
// Overridden from ContentHandlerFactory::ManagedDelegate:
- void RunApplication(ShellPtr shell, URLResponsePtr response) override {
+ void RunApplication(InterfaceRequest<Application> application_request,
+ URLResponsePtr response) override {
std::unique_ptr<base::ScopedTempDir> temp_dir =
ExtractApplication(response.Pass());
base::FilePath directory_path = temp_dir->path();
@@ -135,12 +136,14 @@ class PythonContentHandler : public ApplicationDelegate,
}
if (PyCallable_Check(py_function)) {
- MojoHandle shell_handle = shell.PassMessagePipe().release().value();
- ScopedPyRef py_input(PyInt_FromLong(shell_handle));
+ MojoHandle application_request_handle =
+ application_request.PassMessagePipe().release().value();
+ ScopedPyRef py_input(PyInt_FromLong(application_request_handle));
ScopedPyRef py_arguments(PyTuple_New(1));
// py_input reference is stolen by py_arguments
PyTuple_SetItem(py_arguments, 0, py_input.Release());
- // Run MojoMain with shell_handle as the first and only argument.
+ // Run MojoMain with application_request_handle as the first and only
+ // argument.
ScopedPyRef py_output(PyObject_CallObject(py_function, py_arguments));
if (!py_output) {

Powered by Google App Engine
This is Rietveld 408576698