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

Side by Side Diff: services/python/content_handler/content_handler_main.cc

Issue 2011383002: Get rid of {Run,Terminate}MainApplication(), and more ApplicationDelegate conversion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 4 years, 6 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
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 #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"
11 #include "base/strings/string_split.h" 11 #include "base/strings/string_split.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "mojo/application/content_handler_factory.h" 13 #include "mojo/application/content_handler_factory.h"
14 #include "mojo/data_pipe_utils/data_pipe_utils.h" 14 #include "mojo/data_pipe_utils/data_pipe_utils.h"
15 #include "mojo/environment/scoped_chromium_init.h"
15 #include "mojo/public/c/system/main.h" 16 #include "mojo/public/c/system/main.h"
16 #include "mojo/public/cpp/application/application_impl_base.h" 17 #include "mojo/public/cpp/application/application_impl_base.h"
17 #include "mojo/public/cpp/application/run_application.h" 18 #include "mojo/public/cpp/application/run_application.h"
18 #include "mojo/public/python/src/common.h" 19 #include "mojo/public/python/src/common.h"
19 #include "third_party/zlib/google/zip_reader.h" 20 #include "third_party/zlib/google/zip_reader.h"
20 #include "url/gurl.h" 21 #include "url/gurl.h"
21 22
22 char kMojoSystem[] = "mojo_system"; 23 char kMojoSystem[] = "mojo_system";
23 char kMojoSystemImpl[] = "mojo_system_impl"; 24 char kMojoSystemImpl[] = "mojo_system_impl";
24 char kMojoMain[] = "MojoMain"; 25 char kMojoMain[] = "MojoMain";
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 PythonContentHandler debug_content_handler_; 236 PythonContentHandler debug_content_handler_;
236 237
237 DISALLOW_COPY_AND_ASSIGN(PythonContentHandlerApp); 238 DISALLOW_COPY_AND_ASSIGN(PythonContentHandlerApp);
238 }; 239 };
239 240
240 } // namespace content_handler 241 } // namespace content_handler
241 } // namespace python 242 } // namespace python
242 } // namespace services 243 } // namespace services
243 244
244 MojoResult MojoMain(MojoHandle application_request) { 245 MojoResult MojoMain(MojoHandle application_request) {
246 mojo::ScopedChromiumInit init;
245 services::python::content_handler::PythonContentHandlerApp 247 services::python::content_handler::PythonContentHandlerApp
246 python_content_handler_app; 248 python_content_handler_app;
247 return mojo::RunMainApplication(application_request, 249 return mojo::RunApplication(application_request, &python_content_handler_app);
248 &python_content_handler_app);
249 } 250 }
OLDNEW
« no previous file with comments | « services/prediction/prediction_service_impl.cc ('k') | services/test_service/test_request_tracker_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698