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

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed)

Created:
4 years, 10 months ago by vardhan
Modified:
4 years, 10 months ago
Reviewers:
jamesr, viettrungluu
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

Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. This includes replacing all consumers of InterfacePtr<> (which were previously generated; mostly they are implementations of interfaces) with InterfaceHandle<>. This was a fairly mechanical process of replacing InterfacePtr with InterfaceHandle<>, and I've transformed one from the other at the earliest occurance. There are places where I could've delayed converting InterfaceHandle->InterfacePtr to a later point, but this entire job was very arduous. This CL needs to follow up with another doing the same thing, but in Flutter engine's services. BUG=#662 R=viettrungluu@chromium.org, jamesr@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/c3575c4d8a7aa8a877298f1c8a405bb62e256a04

Patch Set 1 #

Total comments: 20

Patch Set 2 : removed unnecessary header includes, replaced .Pass() with std::move() in a few places #

Patch Set 3 : delay InterfacePtr::Create() until you actually need an InterfacePtr. GetProxy() and ConnectToAppl… #

Total comments: 20

Patch Set 4 : rebase ontop of master, address trung's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+566 lines, -316 lines) Patch
M apps/moterm/moterm_app.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M apps/moterm/moterm_app.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M apps/moterm/moterm_view.h View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M apps/moterm/moterm_view.cc View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M examples/content_handler_demo/content_handler_demo.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M examples/echo_terminal/main.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M examples/forwarding_content_handler/forwarding_content_handler.cc View 3 chunks +6 lines, -4 lines 0 comments Download
M examples/indirect_service/indirect_integer_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M examples/indirect_service/indirect_service_demo.cc View 1 chunk +2 lines, -1 line 0 comments Download
M examples/moterm_example_app/moterm_example_app.cc View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M examples/native_run_app/native_run_app.cc View 1 2 4 chunks +9 lines, -6 lines 0 comments Download
M examples/notification_generator/notification_generator.cc View 1 2 2 chunks +5 lines, -2 lines 0 comments Download
M examples/spinning_cube/gles2_client_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M examples/spinning_cube/gles2_client_impl.cc View 1 4 chunks +17 lines, -14 lines 0 comments Download
M examples/spinning_cube/spinning_cube_app.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M examples/ui/noodles/noodles_app.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/noodles/noodles_app.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/pdf_viewer/pdf_viewer.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/png_viewer/png_viewer.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/shapes/shapes_app.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/shapes/shapes_app.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/spinning_cube/spinning_cube_app.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/spinning_cube/spinning_cube_app.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/tile/tile_app.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M examples/ui/tile/tile_app.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mojo/common/trace_provider_impl.h View 1 chunk +3 lines, -2 lines 0 comments Download
M mojo/common/trace_provider_impl.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.cc View 1 2 4 chunks +11 lines, -10 lines 0 comments Download
M mojo/gpu/gl_context.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/gpu/gl_context.cc View 1 2 2 chunks +8 lines, -8 lines 0 comments Download
M mojo/public/cpp/application/application_impl.h View 3 chunks +5 lines, -5 lines 0 comments Download
M mojo/public/cpp/application/connect.h View 1 2 3 chunks +37 lines, -2 lines 0 comments Download
M mojo/public/cpp/application/lib/application_impl.cc View 1 2 3 chunks +7 lines, -6 lines 0 comments Download
M mojo/public/cpp/application/lib/application_test_base.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M mojo/public/cpp/application/lib/service_registry.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/cpp/application/lib/service_registry.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/binding.h View 1 2 3 4 chunks +32 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/interface_handle.h View 1 2 3 3 chunks +16 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/interface_request.h View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/array_serialization.h View 3 chunks +8 lines, -7 lines 0 comments Download
M mojo/public/cpp/bindings/lib/bindings_internal.h View 1 3 chunks +6 lines, -6 lines 0 comments Download
M mojo/public/cpp/bindings/lib/bindings_serialization.h View 2 chunks +8 lines, -12 lines 0 comments Download
M mojo/public/cpp/bindings/strong_binding.h View 1 2 3 4 chunks +31 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/array_unittest.cc View 3 chunks +9 lines, -9 lines 0 comments Download
M mojo/public/cpp/bindings/tests/binding_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/public/cpp/bindings/tests/handle_passing_unittest.cc View 3 chunks +7 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/sample_service_unittest.cc View 4 chunks +5 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/tests/union_unittest.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl View 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_cpp_generator.py View 3 chunks +3 lines, -3 lines 0 comments Download
M mojo/ui/gl_renderer_unittest.cc View 1 2 3 7 chunks +14 lines, -6 lines 0 comments Download
M mojo/ui/view_provider_app.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/ui/view_provider_app.cc View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_factory.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_factory.cc View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_meta_factory_impl.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_meta_factory_impl.cc View 1 2 2 chunks +7 lines, -4 lines 0 comments Download
M services/dart/dart_tracing.h View 1 chunk +3 lines, -2 lines 0 comments Download
M services/dart/dart_tracing.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M services/gfx/compositor/backend/gpu_output.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M services/gfx/compositor/backend/gpu_output.cc View 1 2 2 chunks +9 lines, -9 lines 0 comments Download
M services/gfx/compositor/backend/gpu_rasterizer.h View 1 chunk +1 line, -1 line 0 comments Download
M services/gfx/compositor/backend/gpu_rasterizer.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M services/gfx/compositor/compositor_engine.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M services/gfx/compositor/compositor_engine.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M services/gfx/compositor/compositor_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M services/gfx/compositor/compositor_impl.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M services/gfx/compositor/graph/scene_def.cc View 2 chunks +4 lines, -1 line 0 comments Download
M services/gfx/compositor/scene_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M services/gfx/compositor/scene_impl.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M services/gles2/command_buffer_driver.h View 1 chunk +5 lines, -3 lines 0 comments Download
M services/gles2/command_buffer_driver.cc View 2 chunks +8 lines, -4 lines 0 comments Download
M services/gles2/command_buffer_impl.h View 1 chunk +7 lines, -4 lines 0 comments Download
M services/gles2/command_buffer_impl.cc View 3 chunks +8 lines, -5 lines 0 comments Download
M services/http_server/http_server_impl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M services/http_server/http_server_impl.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M services/keyboard/linux/keyboard_service_impl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M services/keyboard/linux/keyboard_service_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M services/native_support/process_impl.h View 1 chunk +4 lines, -4 lines 0 comments Download
M services/native_support/process_impl.cc View 1 5 chunks +12 lines, -9 lines 0 comments Download
M services/native_viewport/native_viewport_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M services/native_viewport/native_viewport_impl.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M services/native_viewport/onscreen_context_provider.h View 1 chunk +2 lines, -1 line 0 comments Download
M services/native_viewport/onscreen_context_provider.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M services/ui/input_manager/input_associate.h View 1 3 chunks +4 lines, -3 lines 0 comments Download
M services/ui/input_manager/input_associate.cc View 4 chunks +11 lines, -7 lines 0 comments Download
M services/ui/view_manager/view_host_impl.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M services/ui/view_manager/view_host_impl.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M services/ui/view_manager/view_manager_impl.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M services/ui/view_manager/view_manager_impl.cc View 1 2 3 2 chunks +10 lines, -6 lines 0 comments Download
M services/ui/view_manager/view_registry.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M services/ui/view_manager/view_registry.cc View 1 2 3 2 chunks +8 lines, -6 lines 0 comments Download
M services/ui/view_manager/view_stub.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/view_manager/view_stub.cc View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M services/ui/view_manager/view_tree_host_impl.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M services/ui/view_manager/view_tree_host_impl.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M shell/application_manager/application_manager.h View 1 4 chunks +12 lines, -11 lines 0 comments Download
M shell/application_manager/application_manager.cc View 7 chunks +7 lines, -7 lines 0 comments Download
M shell/application_manager/shell_impl.h View 1 3 chunks +7 lines, -6 lines 0 comments Download
M shell/application_manager/shell_impl.cc View 1 3 chunks +11 lines, -8 lines 0 comments Download
M shell/crash/crash_upload_unittests.cc View 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
vardhan
PTAL
4 years, 10 months ago (2016-02-10 00:34:19 UTC) #1
viettrungluu
https://codereview.chromium.org/1682113003/diff/1/examples/native_run_app/native_run_app.cc File examples/native_run_app/native_run_app.cc (right): https://codereview.chromium.org/1682113003/diff/1/examples/native_run_app/native_run_app.cc#newcode49 examples/native_run_app/native_run_app.cc:49: explicit TerminalConnection(mojo::files::FilePtr terminal, You should probably make this take ...
4 years, 10 months ago (2016-02-10 01:04:08 UTC) #2
viettrungluu
lgtm w/nits&notes Please send a PSA to mojo-dev when you land this. https://codereview.chromium.org/1682113003/diff/40001/mojo/public/cpp/bindings/binding.h File mojo/public/cpp/bindings/binding.h ...
4 years, 10 months ago (2016-02-11 18:26:29 UTC) #3
vardhan
https://codereview.chromium.org/1682113003/diff/1/examples/native_run_app/native_run_app.cc File examples/native_run_app/native_run_app.cc (right): https://codereview.chromium.org/1682113003/diff/1/examples/native_run_app/native_run_app.cc#newcode49 examples/native_run_app/native_run_app.cc:49: explicit TerminalConnection(mojo::files::FilePtr terminal, On 2016/02/10 01:04:08, viettrungluu wrote: > ...
4 years, 10 months ago (2016-02-11 22:47:53 UTC) #4
vardhan
4 years, 10 months ago (2016-02-11 23:08:28 UTC) #6
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
c3575c4d8a7aa8a877298f1c8a405bb62e256a04 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698