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

Issue 7395005: Proxy PPB_Input_Event, PPP_Input_Event, and associated IFs. (Closed)

Created:
9 years, 5 months ago by dmichael (off chromium)
Modified:
9 years, 5 months ago
CC:
native-client-reviews_googlegroups.com, brettw, polina
Visibility:
Public.

Description

Proxy PPB_Input_Event, PPP_Input_Event, and associated IFs. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2035 TEST=ppapi_examples_event.cc (mball is helping with an automated test right now) Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=6135

Patch Set 1 : Mostly working; key events aren't #

Patch Set 2 : Update gyp file #

Patch Set 3 : Another gyp fix, windows build fix #

Total comments: 15

Patch Set 4 : fixes based on review #

Patch Set 5 : Windows doesn't like srpc converting bool to int #

Patch Set 6 : Fix another Windows/bool complaint #

Patch Set 7 : $#!@ing Windows defines 'interface' at global scope. WTH #

Patch Set 8 : copyright headers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1195 lines, -155 lines) Patch
M src/shared/ppapi_proxy/browser_globals.h View 3 chunks +5 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/browser_globals.cc View 3 chunks +27 lines, -0 lines 0 comments Download
A src/shared/ppapi_proxy/browser_ppb_input_event_rpc_server.cc View 1 2 3 4 5 6 1 chunk +70 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/browser_ppp.h View 1 2 4 chunks +9 lines, -1 line 0 comments Download
M src/shared/ppapi_proxy/browser_ppp.cc View 5 chunks +11 lines, -3 lines 0 comments Download
A src/shared/ppapi_proxy/browser_ppp_input_event.h View 1 2 3 4 5 6 7 1 chunk +31 lines, -0 lines 0 comments Download
A src/shared/ppapi_proxy/browser_ppp_input_event.cc View 1 2 3 4 5 6 1 chunk +114 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/browser_ppp_instance.cc View 1 2 3 1 chunk +6 lines, -8 lines 0 comments Download
M src/shared/ppapi_proxy/build.scons View 6 chunks +5 lines, -9 lines 0 comments Download
A src/shared/ppapi_proxy/input_event_data.h View 1 2 3 4 5 6 7 1 chunk +45 lines, -0 lines 0 comments Download
A src/shared/ppapi_proxy/input_event_data.cc View 1 2 3 4 5 6 7 1 chunk +25 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/nacl.scons View 5 chunks +5 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/plugin_globals.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/plugin_globals.cc View 2 chunks +11 lines, -1 line 0 comments Download
M src/shared/ppapi_proxy/plugin_ppb.cc View 4 chunks +9 lines, -1 line 0 comments Download
A src/shared/ppapi_proxy/plugin_ppb_input_event.h View 1 2 3 4 5 6 7 1 chunk +59 lines, -0 lines 0 comments Download
A src/shared/ppapi_proxy/plugin_ppb_input_event.cc View 1 2 3 4 5 1 chunk +303 lines, -0 lines 0 comments Download
A src/shared/ppapi_proxy/plugin_ppp_input_event_rpc_server.cc View 1 chunk +94 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/plugin_resource.h View 1 2 3 5 chunks +37 lines, -40 lines 0 comments Download
M src/shared/ppapi_proxy/plugin_resource.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -12 lines 0 comments Download
M src/shared/ppapi_proxy/plugin_resource_tracker.h View 1 2 3 4 5 6 7 4 chunks +10 lines, -7 lines 0 comments Download
M src/shared/ppapi_proxy/plugin_resource_tracker.cc View 1 2 3 4 5 6 7 6 chunks +16 lines, -8 lines 0 comments Download
M src/shared/ppapi_proxy/ppapi_proxy.gyp View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
A src/shared/ppapi_proxy/ppb_input_event.srpc View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/ppb_rpc_client.cc View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/ppb_rpc_server.cc View 1 2 3 4 2 chunks +33 lines, -0 lines 0 comments Download
A src/shared/ppapi_proxy/ppp_input_event.srpc View 1 chunk +20 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/ppp_rpc_client.cc View 1 chunk +20 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/ppp_rpc_server.cc View 2 chunks +18 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/proxy_var.h View 1 chunk +5 lines, -6 lines 0 comments Download
M src/shared/ppapi_proxy/trusted/srpcgen/ppb_rpc.h View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h View 1 chunk +16 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/untrusted/srpcgen/ppb_rpc.h View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
M src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h View 1 chunk +17 lines, -0 lines 0 comments Download
M src/trusted/plugin/ppapi/plugin_ppapi.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/trusted/plugin/ppapi/plugin_ppapi.cc View 1 3 chunks +19 lines, -4 lines 0 comments Download
M tests/ppapi_example_events/ppapi_example_events.cc View 1 2 3 3 chunks +46 lines, -55 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
dmichael (off chromium)
This is mostly working now, so I'd like to start the review since time is ...
9 years, 5 months ago (2011-07-18 22:31:06 UTC) #1
dmichael (off chromium)
Last night I figured out the keyboard event problem. Unfiltered events in the chrome implementation ...
9 years, 5 months ago (2011-07-19 14:29:59 UTC) #2
dmichael (off chromium)
http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/plugin_resource.h File src/shared/ppapi_proxy/plugin_resource.h (left): http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/plugin_resource.h#oldcode59 src/shared/ppapi_proxy/plugin_resource.h:59: PP_Resource GetReference(); Note to reviewers: resource_id_ was never set, ...
9 years, 5 months ago (2011-07-19 14:47:40 UTC) #3
sehr (please use chromium)
LGTM with a few nits and/or minor coding convention issues. Sorry for the delay. http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/browser_ppp_input_event.cc ...
9 years, 5 months ago (2011-07-20 00:33:40 UTC) #4
dmichael (off chromium)
9 years, 5 months ago (2011-07-20 03:50:22 UTC) #5
Fixed up style issues and deleted the whole static map thing, since it should be
the browser's responsibility to ignore the return value of unfiltered events
anyway. Running the trybots again. PTAL if you can.

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/brow...
File src/shared/ppapi_proxy/browser_ppp_input_event.cc (right):

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/brow...
src/shared/ppapi_proxy/browser_ppp_input_event.cc:91: //  char* event_data =
const_cast<char*>(reinterpret_cast<const char*>(data));
On 2011/07/20 00:33:41, sehr wrote:
> Why is this commented out?  Remove it.
Oops, done.

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/brow...
File src/shared/ppapi_proxy/browser_ppp_input_event.h (right):

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/brow...
src/shared/ppapi_proxy/browser_ppp_input_event.h:39: // Allows BrowserInstance
to remove and instance from our map on deletion of
On 2011/07/20 00:33:41, sehr wrote:
> s/and/an/

Done.

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/brow...
src/shared/ppapi_proxy/browser_ppp_input_event.h:63: static
InstanceRegisteredTypesMap map;
On 2011/07/20 00:33:41, sehr wrote:
> The same thread safety issue we were talking about in my CL is here, right? 
Or
> is this only going to run on the main thread?
Input events always come in on the main thread. The RequestInputEvents,
RequestFilteringInputEvents, and ClearInputEvents, however, I have no control
over. Nice catch...  I guess we might as well start trying to put thread safety
in from the get-go, because it's hard to bandaid it on.

In this case, I realized this whole map was not necessary. It did help me catch
a bug in chrome, since I was always returning false for unfiltered events. But
in reality, Chrome should ignore our return value for us in the unfiltered case,
and we shouldn't have to worry about it in the proxy. I'll double check that
Brett's okay with this. It saves a bunch of error-prone code.

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/plug...
File src/shared/ppapi_proxy/plugin_ppb_input_event.cc (right):

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/plug...
src/shared/ppapi_proxy/plugin_ppb_input_event.cc:199: &::RequestInputEvents,
On 2011/07/20 00:33:41, sehr wrote:
> I think in the rest of the proxy we've not used the &::.  Please remove it.
Good point. The & is definitely unnecessary. The latter 3 need the :: to select
the ones at file scope instead of the functions with the same name at class
scope, which otherwise win out by overloading rules. If you'd rather I rename
functions or something, let me know.

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/plug...
File src/shared/ppapi_proxy/plugin_resource_tracker.h (right):

http://codereview.chromium.org/7395005/diff/12001/src/shared/ppapi_proxy/plug...
src/shared/ppapi_proxy/plugin_resource_tracker.h:79: explicit
ResourceAndRefCounts(PluginResource* r, size_t browser_refcount);
On 2011/07/20 00:33:41, sehr wrote:
> Nit. explicit isn't strictly necessary for a binary constructor.

Done.

Powered by Google App Engine
This is Rietveld 408576698