|
Remove Client relationship between mojo.Shell/mojo.Application
Instead of mojo.Shell and mojo.Application being clients of each other
they are now separate interfaces. An implementation of mojo.Application
receives a handle to the shell in its Initialize call, as described in
this doc:
https://docs.google.com/document/d/1xjt_TPjTu0elix8fNdBgWmnjJdJAtqSr1XDS_C-Ct8E/edit?usp=sharing
An analogous change is made to the content handler definition.
In C++, this is handled by the mojo::ApplicationImpl class which stores
shell handle in its implementation of Initialize. Thus the only change
for most C++ applications is the meaning of the handle in MojoMain is
different, although mains that use the ApplicationRunners do the same
thing with it. Connecting to other apps is largely the same although
instead of grabbing the ApplicationImpl's client() to talk to the shell
code must now use the ApplicationImpl::shell() getter.
In JavaScript, the initialization sequence is a bit different although
this is hidden mostly in the Application class which calls initialize()
on its subclass with the same set of parameters. Connecting to another
application looks different, especially for sky code using the shell
proxy handle exposed via internals. Hans has some ideas about how to
make this a bit nicer.
Python apps similarly need to change their startup sequence a bit. I
didn't find a common library to take care of this dance, although it's
possible I just missed it.
Other languages probably a bit of reworking - I fixed everything here
that is covered by mojob.py test but some might be missing.
This patch also uses typed handles (i.e. InterfacePtr<> or
InterfaceRequest<> or their type aliases) wherever possible instead of
ScopedMessagePipeHandle for clarity.
R=davemoore@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/e5ae9e408fb4f1b888a93502af65c6a9615a0ad1
Total comments: 1
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+525 lines, -398 lines) |
Patch |
 |
M |
examples/content_handler_demo/content_handler_demo.cc
|
View
|
|
3 chunks |
+11 lines, -8 lines |
0 comments
|
Download
|
 |
M |
examples/pdf_viewer/pdf_viewer.cc
|
View
|
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
examples/png_viewer/png_viewer.cc
|
View
|
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
examples/python/__mojo__.py
|
View
|
1
|
3 chunks |
+8 lines, -7 lines |
0 comments
|
Download
|
 |
M |
examples/recipes/recipe_handler/recipe_handler_main.cc
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
examples/recursive_content_handler/recursive_content_handler.cc
|
View
|
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
mojo/application/application_runner_chromium.cc
|
View
|
|
2 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/application/application_test_main_chromium.cc
|
View
|
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/application/content_handler_factory.h
|
View
|
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
mojo/application/content_handler_factory.cc
|
View
|
|
4 chunks |
+12 lines, -11 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/application/BUILD.gn
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/application/application_impl.h
|
View
|
1
|
3 chunks |
+13 lines, -6 lines |
4 comments
|
Download
|
 |
M |
mojo/public/cpp/application/application_test_base.h
|
View
|
|
3 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/application/lib/application_impl.cc
|
View
|
1
|
3 chunks |
+21 lines, -16 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/application/lib/application_runner.cc
|
View
|
1
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/application/lib/application_test_base.cc
|
View
|
1
|
5 chunks |
+54 lines, -51 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/application/lib/application_test_main.cc
|
View
|
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/binding.h
|
View
|
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/public/cpp/bindings/strong_binding.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/public/interfaces/application/application.mojom
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
mojo/public/interfaces/application/shell.mojom
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
mojo/public/js/connection.js
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/python/content_handler/content_handler_main.cc
|
View
|
|
2 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/services/content_handler/public/interfaces/content_handler.mojom
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
mojo/services/public/js/application.js
|
View
|
1
2
|
2 chunks |
+23 lines, -10 lines |
0 comments
|
Download
|
 |
M |
mojo/services/public/js/shell.js
|
View
|
1
|
2 chunks |
+4 lines, -7 lines |
0 comments
|
Download
|
 |
M |
mojo/services/view_manager/public/cpp/tests/view_manager_unittest.cc
|
View
|
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
services/dart/content_handler_main.cc
|
View
|
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
services/dart/dart_app.h
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
services/dart/dart_app.cc
|
View
|
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
services/js/content_handler_main.cc
|
View
|
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
services/js/js_app.h
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
services/js/js_app.cc
|
View
|
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
services/window_manager/window_manager_api_unittest.cc
|
View
|
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
shell/android/android_handler.h
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
shell/android/android_handler.cc
|
View
|
1
2
|
4 chunks |
+8 lines, -4 lines |
0 comments
|
Download
|
 |
M |
shell/android/android_handler_loader.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
shell/android/android_handler_loader.cc
|
View
|
1
2
|
1 chunk |
+8 lines, -6 lines |
0 comments
|
Download
|
 |
M |
shell/android/background_application_loader.h
|
View
|
1
2
|
2 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
shell/android/background_application_loader.cc
|
View
|
1
2
|
3 chunks |
+10 lines, -8 lines |
0 comments
|
Download
|
 |
M |
shell/android/background_application_loader_unittest.cc
|
View
|
1
2
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
shell/android/native_viewport_application_loader.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
shell/android/native_viewport_application_loader.cc
|
View
|
1
2
|
1 chunk |
+7 lines, -6 lines |
0 comments
|
Download
|
 |
M |
shell/android/ui_application_loader_android.h
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/android/ui_application_loader_android.cc
|
View
|
1
2
|
2 chunks |
+12 lines, -10 lines |
0 comments
|
Download
|
 |
M |
shell/app_child_process.cc
|
View
|
|
2 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
shell/app_child_process.mojom
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/application_manager/application_loader.h
|
View
|
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
shell/application_manager/application_loader.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
shell/application_manager/application_manager.h
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/application_manager/application_manager.cc
|
View
|
1
|
3 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
shell/application_manager/application_manager_unittest.cc
|
View
|
1
|
3 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
shell/application_manager/shell_impl.h
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/application_manager/shell_impl.cc
|
View
|
|
1 chunk |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
shell/dynamic_application_loader.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
shell/dynamic_application_loader.cc
|
View
|
|
9 chunks |
+18 lines, -17 lines |
0 comments
|
Download
|
 |
M |
shell/dynamic_application_loader_unittest.cc
|
View
|
1
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
shell/dynamic_service_runner.h
|
View
|
|
4 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/dynamic_service_runner.cc
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/external_application_listener.h
|
View
|
1
|
3 chunks |
+12 lines, -9 lines |
0 comments
|
Download
|
 |
M |
shell/external_application_listener.cc
|
View
|
1
|
2 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
shell/external_application_listener_unittest.cc
|
View
|
1
|
7 chunks |
+52 lines, -42 lines |
0 comments
|
Download
|
 |
M |
shell/external_application_registrar.mojom
|
View
|
1
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/external_application_registrar_connection.h
|
View
|
1
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
shell/external_application_registrar_connection.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/in_process_dynamic_service_runner.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
shell/in_process_dynamic_service_runner.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
shell/launcher_main.cc
|
View
|
1
|
2 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
 |
M |
shell/out_of_process_dynamic_service_runner.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
shell/out_of_process_dynamic_service_runner.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
sky/framework/inspector/inspector.sky
|
View
|
1
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
sky/tests/services/network.sky
|
View
|
1
|
2 chunks |
+18 lines, -3 lines |
0 comments
|
Download
|
 |
M |
sky/viewer/content_handler_impl.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
sky/viewer/content_handler_impl.cc
|
View
|
|
4 chunks |
+13 lines, -9 lines |
0 comments
|
Download
|
 |
M |
sky/viewer/internals.cc
|
View
|
1
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
Total messages: 11 (1 generated)
|