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

Issue 7529041: Maintain key state in the plugin delegate if UIPI is enabled. (Closed)

Created:
9 years, 4 months ago by jschuh
Modified:
9 years, 4 months ago
Reviewers:
cpu_(ooo_6.6-7.5), jam
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Maintain key state in the plugin delegate if UIPI is enabled. UIPI blocks keystate across process boundaries in certain situations. To be safe we maintain our own key state and intercept calls to GetKeyState. BUG=86895 TEST=Adobe has test coverage. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96069

Patch Set 1 : '' #

Total comments: 5

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -2 lines) Patch
M webkit/plugins/npapi/webplugin_delegate_impl.h View 2 chunks +4 lines, -0 lines 0 comments Download
M webkit/plugins/npapi/webplugin_delegate_impl_win.cc View 1 2 3 5 chunks +83 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
jschuh
@cpu for code and @jam for owners (plus relevant plugin knowledge).
9 years, 4 months ago (2011-08-09 03:43:46 UTC) #1
jam
http://codereview.chromium.org/7529041/diff/3005/webkit/plugins/npapi/webplugin_delegate_impl_win.cc File webkit/plugins/npapi/webplugin_delegate_impl_win.cc (right): http://codereview.chromium.org/7529041/diff/3005/webkit/plugins/npapi/webplugin_delegate_impl_win.cc#newcode95 webkit/plugins/npapi/webplugin_delegate_impl_win.cc:95: size_t g_saved_key_state[256 / sizeof(size_t)]; I'm not sure I follow ...
9 years, 4 months ago (2011-08-09 16:26:18 UTC) #2
jschuh
http://codereview.chromium.org/7529041/diff/3005/webkit/plugins/npapi/webplugin_delegate_impl_win.cc File webkit/plugins/npapi/webplugin_delegate_impl_win.cc (right): http://codereview.chromium.org/7529041/diff/3005/webkit/plugins/npapi/webplugin_delegate_impl_win.cc#newcode95 webkit/plugins/npapi/webplugin_delegate_impl_win.cc:95: size_t g_saved_key_state[256 / sizeof(size_t)]; On 2011/08/09 16:26:18, John Abd-El-Malek ...
9 years, 4 months ago (2011-08-09 16:48:04 UTC) #3
jschuh
http://codereview.chromium.org/7529041/diff/3005/webkit/plugins/npapi/webplugin_delegate_impl_win.cc File webkit/plugins/npapi/webplugin_delegate_impl_win.cc (right): http://codereview.chromium.org/7529041/diff/3005/webkit/plugins/npapi/webplugin_delegate_impl_win.cc#newcode95 webkit/plugins/npapi/webplugin_delegate_impl_win.cc:95: size_t g_saved_key_state[256 / sizeof(size_t)]; On 2011/08/09 16:48:04, Justin Schuh ...
9 years, 4 months ago (2011-08-09 18:06:45 UTC) #4
jschuh
So, my bit array was using far more space than it should. This cleans it ...
9 years, 4 months ago (2011-08-09 19:24:24 UTC) #5
jam
lgtm
9 years, 4 months ago (2011-08-09 19:32:03 UTC) #6
cpu_(ooo_6.6-7.5)
lgtm http://codereview.chromium.org/7529041/diff/8001/webkit/plugins/npapi/webplugin_delegate_impl_win.cc File webkit/plugins/npapi/webplugin_delegate_impl_win.cc (right): http://codereview.chromium.org/7529041/diff/8001/webkit/plugins/npapi/webplugin_delegate_impl_win.cc#newcode110 webkit/plugins/npapi/webplugin_delegate_impl_win.cc:110: } zeromemory is just a macro to memset ...
9 years, 4 months ago (2011-08-09 20:07:31 UTC) #7
jschuh
9 years, 4 months ago (2011-08-09 20:57:27 UTC) #8
Okay, changes made.

http://codereview.chromium.org/7529041/diff/8001/webkit/plugins/npapi/webplug...
File webkit/plugins/npapi/webplugin_delegate_impl_win.cc (right):

http://codereview.chromium.org/7529041/diff/8001/webkit/plugins/npapi/webplug...
webkit/plugins/npapi/webplugin_delegate_impl_win.cc:110: }
On 2011/08/09 20:07:31, cpu wrote:
> zeromemory is just a macro to memset

I know. It's just a habit I have, but I'm happy to change it.

http://codereview.chromium.org/7529041/diff/8001/webkit/plugins/npapi/webplug...
webkit/plugins/npapi/webplugin_delegate_impl_win.cc:995:
SetSavedKeyState(wparam);
On 2011/08/09 20:07:31, cpu wrote:
> wparam % 256
> 
> Here or inside, your choice.

I assumed we shouldn't ever see a value larger than 254. So, adding a CHECK
instead.

Powered by Google App Engine
This is Rietveld 408576698