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

Issue 281803003: Add PPAPI_BEGIN_MESSAGE_MAP and PPAPI_END_MESSAGE_MAP to be used when dispatching IPCs using PPAPI_… (Closed)

Created:
6 years, 7 months ago by jam
Modified:
6 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, extensions-reviews_chromium.org, dcheng, chromium-apps-reviews_chromium.org, site-isolation-reviews_chromium.org
Visibility:
Public.

Description

Add PPAPI_BEGIN_MESSAGE_MAP and PPAPI_END_MESSAGE_MAP to be used when dispatching IPCs using PPAPI_DISPATCH_*. This is because the IPC_BEGIN_MESSAGE_MAP macros are closely tied to IPC_MESSAGE_HANDLERS. This is split off from https://codereview.chromium.org/283623002/ BUG=304341 R=brettw@chromium.org, tsepez@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270218

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+404 lines, -372 lines) Patch
M chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.cc View 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc View 1 chunk +13 lines, -13 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_talk_host.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M chrome/renderer/pepper/pepper_extensions_common_host.cc View 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/renderer/pepper/pepper_flash_font_file_host.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/renderer/pepper/pepper_flash_fullscreen_host.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/renderer/pepper/pepper_flash_menu_host.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/renderer/pepper/pepper_flash_renderer_host.cc View 1 chunk +13 lines, -13 lines 0 comments Download
M chrome/renderer/pepper/pepper_pdf_host.cc View 1 chunk +21 lines, -20 lines 0 comments Download
M chrome/renderer/pepper/pepper_shared_memory_message_filter.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/renderer/pepper/pepper_uma_host.cc View 1 chunk +10 lines, -10 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_file_io_host.cc View 1 chunk +11 lines, -10 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_file_ref_host.cc View 1 chunk +12 lines, -13 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc View 1 chunk +9 lines, -8 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc View 1 chunk +16 lines, -15 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_gamepad_host.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_message_filter.cc View 1 chunk +3 lines, -5 lines 3 comments Download
M content/browser/renderer_host/pepper/pepper_network_proxy_host.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_printing_host.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_renderer_connection.cc View 1 chunk +7 lines, -7 lines 1 comment Download
M content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc View 1 chunk +20 lines, -17 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc View 1 chunk +11 lines, -9 lines 0 comments Download
M content/renderer/pepper/pepper_audio_input_host.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_browser_connection.cc View 1 chunk +3 lines, -3 lines 1 comment Download
M content/renderer/pepper/pepper_device_enumeration_host_helper.cc View 1 chunk +10 lines, -9 lines 0 comments Download
M content/renderer/pepper/pepper_file_chooser_host.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_file_system_host.cc View 1 chunk +7 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host.cc View 1 chunk +14 lines, -14 lines 0 comments Download
M content/renderer/pepper/pepper_media_stream_track_host_base.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_media_stream_video_track_host.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M content/renderer/pepper/pepper_truetype_font_host.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M content/renderer/pepper/pepper_url_loader_host.cc View 1 chunk +11 lines, -10 lines 0 comments Download
M content/renderer/pepper/pepper_video_capture_host.cc View 1 chunk +11 lines, -10 lines 0 comments Download
M content/renderer/pepper/pepper_video_destination_host.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M content/renderer/pepper/pepper_video_source_host.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M content/renderer/pepper/pepper_websocket_host.cc View 1 chunk +12 lines, -11 lines 0 comments Download
M content/renderer/pepper/ppb_broker_impl.cc View 1 chunk +5 lines, -5 lines 1 comment Download
M ppapi/proxy/device_enumeration_resource_helper.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/proxy/dispatch_reply_message.h View 2 chunks +10 lines, -0 lines 2 comments Download
M ppapi/proxy/media_stream_track_resource_base.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/proxy/network_monitor_resource.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_core_proxy.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M ppapi/proxy/talk_resource.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/proxy/url_loader_resource.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/proxy/video_capture_resource.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/proxy/websocket_resource.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jam
6 years, 7 months ago (2014-05-13 19:56:20 UTC) #1
Tom Sepez
LGTM otherwise. Thanks. https://codereview.chromium.org/281803003/diff/1/content/browser/renderer_host/pepper/pepper_message_filter.cc File content/browser/renderer_host/pepper/pepper_message_filter.cc (right): https://codereview.chromium.org/281803003/diff/1/content/browser/renderer_host/pepper/pepper_message_filter.cc#newcode22 content/browser/renderer_host/pepper/pepper_message_filter.cc:22: IPC_BEGIN_MESSAGE_MAP_EX(PepperMessageFilter, msg, *message_was_ok) Did you mean ...
6 years, 7 months ago (2014-05-13 20:03:46 UTC) #2
jam
https://codereview.chromium.org/281803003/diff/1/content/browser/renderer_host/pepper/pepper_message_filter.cc File content/browser/renderer_host/pepper/pepper_message_filter.cc (right): https://codereview.chromium.org/281803003/diff/1/content/browser/renderer_host/pepper/pepper_message_filter.cc#newcode22 content/browser/renderer_host/pepper/pepper_message_filter.cc:22: IPC_BEGIN_MESSAGE_MAP_EX(PepperMessageFilter, msg, *message_was_ok) On 2014/05/13 20:03:47, Tom Sepez wrote: ...
6 years, 7 months ago (2014-05-13 20:19:39 UTC) #3
jam
+dmichael for ppapi
6 years, 7 months ago (2014-05-13 20:54:56 UTC) #4
brettw
pappi lgtm https://codereview.chromium.org/281803003/diff/1/ppapi/proxy/dispatch_reply_message.h File ppapi/proxy/dispatch_reply_message.h (right): https://codereview.chromium.org/281803003/diff/1/ppapi/proxy/dispatch_reply_message.h#newcode132 ppapi/proxy/dispatch_reply_message.h:132: #define PPAPI_BEGIN_MESSAGE_MAP(class_name, msg) \ Can you add ...
6 years, 7 months ago (2014-05-13 21:55:33 UTC) #5
jam
https://codereview.chromium.org/281803003/diff/1/ppapi/proxy/dispatch_reply_message.h File ppapi/proxy/dispatch_reply_message.h (right): https://codereview.chromium.org/281803003/diff/1/ppapi/proxy/dispatch_reply_message.h#newcode132 ppapi/proxy/dispatch_reply_message.h:132: #define PPAPI_BEGIN_MESSAGE_MAP(class_name, msg) \ On 2014/05/13 21:55:33, brettw wrote: ...
6 years, 7 months ago (2014-05-13 21:59:56 UTC) #6
dmichael (off chromium)
lgtm too, though I don't see the comment brettw requested uploaded yet. https://codereview.chromium.org/281803003/diff/1/content/browser/renderer_host/pepper/pepper_message_filter.cc File content/browser/renderer_host/pepper/pepper_message_filter.cc ...
6 years, 7 months ago (2014-05-14 15:40:06 UTC) #7
jam
On 2014/05/14 15:40:06, dmichael wrote: > lgtm too, though I don't see the comment brettw ...
6 years, 7 months ago (2014-05-14 16:28:13 UTC) #8
brettw
On 2014/05/14 16:28:13, jam wrote: > On 2014/05/14 15:40:06, dmichael wrote: > > lgtm too, ...
6 years, 7 months ago (2014-05-14 16:43:19 UTC) #9
dmichael (off chromium)
On Wed, May 14, 2014 at 10:43 AM, <brettw@chromium.org> wrote: > On 2014/05/14 16:28:13, jam ...
6 years, 7 months ago (2014-05-14 17:11:52 UTC) #10
jam
6 years, 7 months ago (2014-05-14 17:22:22 UTC) #11
Message was sent while issue was closed.
On 2014/05/14 17:11:52, dmichael wrote:
> On Wed, May 14, 2014 at 10:43 AM, <mailto:brettw@chromium.org> wrote:
> 
> > On 2014/05/14 16:28:13, jam wrote:
> >
> >> On 2014/05/14 15:40:06, dmichael wrote:
> >> > lgtm too, though I don't see the comment brettw requested uploaded yet.
> >>
> >
> >  I didn't upload a new version with that change, just committed it.
> >>
> > FWIW I really think we should try to upload the final change prior to
> committing. It makes life easier for sheriffs if something breaks and in
> general makes doing software archaeology a lot easier.
> 
> 
> >
> >  >
> >> >
> >>
> >
> > https://codereview.chromium.org/281803003/diff/1/content/
> > browser/renderer_host/pepper/pepper_message_filter.cc
> >
> >> > File content/browser/renderer_host/pepper/pepper_message_filter.cc
> >> (right):
> >> >
> >> >
> >>
> >
> > https://codereview.chromium.org/281803003/diff/1/content/
> > browser/renderer_host/pepper/pepper_message_filter.cc#newcode22
> >
> >> > content/browser/renderer_host/pepper/pepper_message_filter.cc:22:
> >> > IPC_BEGIN_MESSAGE_MAP_EX(PepperMessageFilter, msg, *message_was_ok)
> >> > On 2014/05/13 20:19:39, jam wrote:
> >> > > On 2014/05/13 20:03:47, Tom Sepez wrote:
> >> > > > Did you mean to convert these to PPAI_BEGIN_MESSAGE_MAP as well?
> >> > >
> >> > > these ones still use IPC_MESSAGE_HANDLER, so that's why i didn't
> >> change
> >> them.
> >> > i
> >> > > just fixed the indentation to match our convention
> >> > Note, this is one of clang-format's idiosyncrasies. I haven't turned on
> >> > presubmit checks to enforce it yet, because I'm not done converting all
> >> of
> >> > Pepper over. It's easy enough for me to change back, so I don't mind
> >> either
> >> way.
> >> > I care little enough about the difference here that in the long run I
> >> was
> >> > planning to accept the slightly less nice way to get the benefit of
> >> > clang-format. I can't think of any good way to make clang-format
> >> understand
> >> > this, unless we teach it about our IPC macros.
> >>
> >
> >  sigh. others might call this idiosyncrasies, but i call this formatting
> >> bugs.
> >> when a subset of the codebase chooses to break a convention that has been
> >> observed in the rest of the codebase for ~7 years, that makes things
> >> worse not
> >> better.
> >>
> >
> > I agree with this.
> 
> I agree with you both that:
> 1) The old style is slightly more readable.
> 2) It's bad to have inconsistent style for this.
> 
> But I personally don't think it's worth wringing our hands about it. The
> style is readable enough either way IMO. I look forward to not having to
> worry about style while writing or reviewing, and I'm personally willing to
> accept some minor differences vs established style. I can get used to
> reading any reasonable style much more easily than I can remember to write
> or enforce a particular style.
> 
> In any case, I did file a bug for this particular issue and CCed you both:
> https://code.google.com/p/chromium/issues/detail?id=373340
> ...we'll see if there's a reasonable approach to make the tool match
> established style.

Please don't enable this formatting plugin by default in any directory where it
breaks the convention from chrome. if there's a bug in the tool, then find a way
to fix the tool that you want to format the code, before unilaterally changing
the convention in subset of the code.

Powered by Google App Engine
This is Rietveld 408576698