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

Issue 1648803006: Expose Service Describer in Dart mojo package (Closed)

Created:
4 years, 10 months ago by alexfandrianto
Modified:
4 years, 10 months ago
Reviewers:
rudominer, Cutch, azani, zra
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, yzshen+mojopublicwatch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Expose Service Describer in Dart mojo package In order to access the Dart Mojom types of another service, a Service Describer is used. The ServiceDescriber can be queried for each serviceDescription exposed by the Application. The key API change is that instead of: connection.provideService(String interfaceName, ServiceFactory factory) the function now has an additional optional argument: {service_describer.ServiceDescription description} If any description is provided by the developer, then the system will handle setting up and providing the ServiceDescriber service for all exposed service descriptions. In addition, the templates were tweaked slightly to use "responseFactory" in the ServiceDescription implementation. BUG=fixes #596 R=zra@google.com Committed: https://chromium.googlesource.com/external/mojo/+/a99779f901205bc54024e8accab2b13b2e356dfb

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add Service Describer Test #

Patch Set 3 : Use 2016 for new files added #

Patch Set 4 : Fix lint warnings for the apptests #

Patch Set 5 : Rebase Retest and Update Mojoms #

Total comments: 14

Patch Set 6 : Address zra's feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1889 lines, -696 lines) Patch
M mojo/dart/apptests/dart_apptests/BUILD.gn View 1 1 chunk +2 lines, -1 line 0 comments Download
M mojo/dart/apptests/dart_apptests/lib/main.dart View 1 2 chunks +3 lines, -1 line 0 comments Download
A mojo/dart/apptests/dart_apptests/lib/src/service_describer_apptests.dart View 1 2 3 1 chunk +107 lines, -0 lines 0 comments Download
M mojo/dart/apptests/test_apps/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
A + mojo/dart/apptests/test_apps/echo_with_service_describer/BUILD.gn View 1 1 chunk +3 lines, -3 lines 0 comments Download
A mojo/dart/apptests/test_apps/echo_with_service_describer/lib/main.dart View 1 2 3 1 chunk +41 lines, -0 lines 0 comments Download
A mojo/dart/apptests/test_apps/echo_with_service_describer/pubspec.yaml View 1 1 chunk +1 line, -0 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart View 1 2 3 4 5 4 chunks +20 lines, -10 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import.mojom.dart View 1 2 3 4 5 2 chunks +10 lines, -5 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/math/math_calculator.mojom.dart View 1 2 3 4 5 2 chunks +10 lines, -5 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/mojo/examples/echo.mojom.dart View 1 2 3 4 5 2 chunks +10 lines, -5 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_structs.mojom.dart View 1 2 3 4 5 2 chunks +10 lines, -5 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_unions.mojom.dart View 1 2 3 4 5 4 chunks +20 lines, -10 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/validation_test_interfaces.mojom.dart View 1 2 3 4 5 8 chunks +40 lines, -20 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/versioning/versioning_test_client.mojom.dart View 1 2 3 4 5 2 chunks +10 lines, -5 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/regression_tests/regression_tests.mojom.dart View 1 2 3 4 5 12 chunks +60 lines, -30 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_factory.mojom.dart View 1 2 3 4 5 4 chunks +20 lines, -10 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_interfaces.mojom.dart View 1 2 3 4 5 6 chunks +30 lines, -15 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_service.mojom.dart View 1 2 3 4 5 4 chunks +20 lines, -10 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/test/echo_service.mojom.dart View 1 2 3 4 5 2 chunks +10 lines, -5 lines 0 comments Download
M mojo/dart/packages/_mojo_for_test_only/lib/test/pingpong_service.mojom.dart View 1 2 3 4 5 4 chunks +20 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo/lib/application.dart View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/dart/packages/mojo/lib/mojo/application.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo/lib/mojo/application_connector.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo/lib/mojo/bindings/types/service_describer.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo/lib/mojo/service_provider.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo/lib/mojo/shell.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo/lib/src/application.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M mojo/dart/packages/mojo/lib/src/application_connection.dart View 1 2 3 4 5 3 chunks +23 lines, -3 lines 0 comments Download
A mojo/dart/packages/mojo/lib/src/service_describer.dart View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
M mojo/dart/packages/mojo/sources.gni View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/activity/activity.mojom.dart View 1 2 3 4 5 6 chunks +39 lines, -15 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/authentication/authentication.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/contacts/contacts.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/http_server/http_server.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/http_server/http_server_factory.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/icu_data/icu_data.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/input/input.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/keyboard/keyboard.mojom.dart View 1 2 3 4 5 6 chunks +39 lines, -15 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/asset_bundle/asset_bundle.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/authenticating_url_loader_interceptor_meta_factory.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/camera.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/clipboard.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/content_handler.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/cookie_store.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/device_info.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/files/directory.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/files/file.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/files/files.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/geocoder.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/compositor.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/hit_tests.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/renderers.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/resources.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/scenes.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/scheduling.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/host_resolver.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/http_connection.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/http_server.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/location_service.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/audio_server.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/audio_track.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/media_clock.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/media_factory.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/media_pipe.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/media_player.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/media_sink.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/media_source.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/media_transport.mojom.dart View 1 2 3 4 5 6 chunks +39 lines, -15 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/media/rate_control.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/native_viewport_event_dispatcher.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/navigation.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/network_service.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/service_registry.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/sharing.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/surfaces.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/tcp_bound_socket.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/tcp_connected_socket.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/tcp_server_socket.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/terminal/terminal.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/terminal/terminal_client.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/udp_socket.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/ui/input_connection.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/ui/input_dispatcher.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/ui/view_associates.mojom.dart View 1 2 3 4 5 3 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/ui/view_manager.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/ui/view_provider.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/ui/view_trees.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/ui/views.mojom.dart View 1 2 3 4 5 6 chunks +39 lines, -15 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/url_loader.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/url_loader_interceptor.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/url_response_disk_cache.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/mojo/web_socket.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/native_support/process.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/nfc/nfc.mojom.dart View 1 2 3 4 5 6 chunks +39 lines, -15 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/notifications/notifications.mojom.dart View 1 2 3 4 5 6 chunks +39 lines, -15 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/prediction/prediction.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/sensors/sensors.mojom.dart View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/speech_recognizer/speech_recognizer.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/tracing/tracing.mojom.dart View 1 2 3 4 5 6 chunks +39 lines, -15 lines 0 comments Download
M mojo/dart/packages/mojo_services/lib/vsync/vsync.mojom.dart View 1 2 3 4 5 2 chunks +13 lines, -5 lines 0 comments Download
M mojo/dart/unittests/embedder_tests/bindings_generation_test.dart View 1 2 3 4 5 2 chunks +11 lines, -8 lines 0 comments Download
M mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl View 1 2 3 4 5 2 chunks +16 lines, -8 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
alexfandrianto
On 2016/01/30 18:48:58, alexfandrianto wrote: > mailto:alexfandrianto@google.com changed reviewers: > + mailto:azani@chromium.org, mailto:johnmccutchan@google.com, mailto:rudominer@chromium.org, > ...
4 years, 10 months ago (2016-02-03 18:25:53 UTC) #3
zra
BUG= line should be: fixes #596 if landing the change should close the issue, or ...
4 years, 10 months ago (2016-02-04 04:19:48 UTC) #4
alexfandrianto
On 2016/02/04 04:19:48, zra wrote: > BUG= line should be: > > fixes #596 > ...
4 years, 10 months ago (2016-02-04 04:33:32 UTC) #5
alexfandrianto
https://codereview.chromium.org/1648803006/diff/1/mojo/dart/packages/mojo/lib/src/service_describer.dart File mojo/dart/packages/mojo/lib/src/service_describer.dart (right): https://codereview.chromium.org/1648803006/diff/1/mojo/dart/packages/mojo/lib/src/service_describer.dart#newcode1 mojo/dart/packages/mojo/lib/src/service_describer.dart:1: // Copyright 2014 The Chromium Authors. All rights reserved. ...
4 years, 10 months ago (2016-02-04 04:34:15 UTC) #7
alexfandrianto
On 2016/02/04 04:34:15, alexfandrianto wrote: > https://codereview.chromium.org/1648803006/diff/1/mojo/dart/packages/mojo/lib/src/service_describer.dart > File mojo/dart/packages/mojo/lib/src/service_describer.dart (right): > > https://codereview.chromium.org/1648803006/diff/1/mojo/dart/packages/mojo/lib/src/service_describer.dart#newcode1 > ...
4 years, 10 months ago (2016-02-05 03:26:56 UTC) #8
rudominer
This looks fine to me but I would like the Dart folks to approve.
4 years, 10 months ago (2016-02-08 18:08:16 UTC) #9
alexfandrianto
On 2016/02/08 18:08:16, rudominer wrote: > This looks fine to me but I would like ...
4 years, 10 months ago (2016-02-10 21:00:08 UTC) #10
zra
https://codereview.chromium.org/1648803006/diff/80001/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart File mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart (right): https://codereview.chromium.org/1648803006/diff/80001/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart#newcode1350 mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart:1350: static service_describer.ServiceDescription get serviceDescription => Does each access to ...
4 years, 10 months ago (2016-02-10 22:48:25 UTC) #11
alexfandrianto
Thanks, I've incorporated your suggestions. https://codereview.chromium.org/1648803006/diff/80001/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart File mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart (right): https://codereview.chromium.org/1648803006/diff/80001/mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart#newcode1350 mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart:1350: static service_describer.ServiceDescription get serviceDescription ...
4 years, 10 months ago (2016-02-11 01:04:55 UTC) #12
zra
Thanks! lgtm
4 years, 10 months ago (2016-02-11 17:44:27 UTC) #13
alexfandrianto
4 years, 10 months ago (2016-02-11 19:10:46 UTC) #15
Message was sent while issue was closed.
Committed patchset #6 (id:100001) manually as
a99779f901205bc54024e8accab2b13b2e356dfb (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698