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

Issue 11359063: Refactor the way singleton-style resources are exposed via PPB_Instance (Closed)

Created:
8 years, 1 month ago by raymes
Modified:
8 years ago
CC:
chromium-reviews, darin-cc_chromium.org, yzshen1
Visibility:
Public.

Description

Refactor the way singleton-style resources are exposed via PPB_Instance Currently a lot of boilerplate needs to be added everytime we add a new singleton style resource and as we add more of them this will accumulate. This patch reduces the amount of code needed by exposing a GetSingletonResource function in PPB_Instance_API which takes an ID specifying what type of resource is needed. A new Enter type, EnterInstanceAPI, is provided which is templated on the singleton API you want access to. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170221

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 8

Patch Set 5 : . #

Total comments: 6

Patch Set 6 : . #

Total comments: 6

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Total comments: 4

Patch Set 11 : . #

Patch Set 12 : . #

Patch Set 13 : . #

Patch Set 14 : . #

Patch Set 15 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -136 lines) Patch
M ppapi/proxy/gamepad_resource.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/proxy/gamepad_resource.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ppapi/proxy/plugin_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -5 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -5 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +32 lines, -48 lines 0 comments Download
M ppapi/shared_impl/resource.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A ppapi/shared_impl/singleton_resource_id.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +20 lines, -0 lines 0 comments Download
M ppapi/thunk/enter.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +47 lines, -6 lines 0 comments Download
M ppapi/thunk/ppb_flash_clipboard_api.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +17 lines, -17 lines 0 comments Download
M ppapi/thunk/ppb_flash_clipboard_thunk.cc View 1 2 3 4 2 chunks +8 lines, -11 lines 0 comments Download
M ppapi/thunk/ppb_flash_functions_api.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_gamepad_api.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_gamepad_thunk.cc View 1 2 3 4 1 chunk +3 lines, -6 lines 0 comments Download
M ppapi/thunk/ppb_instance_api.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -12 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +9 lines, -11 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +22 lines, -15 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
raymes
8 years, 1 month ago (2012-11-20 21:04:43 UTC) #1
raymes
https://codereview.chromium.org/11359063/diff/4014/ppapi/thunk/ppb_flash_clipboard_thunk.cc File ppapi/thunk/ppb_flash_clipboard_thunk.cc (right): https://codereview.chromium.org/11359063/diff/4014/ppapi/thunk/ppb_flash_clipboard_thunk.cc#newcode20 ppapi/thunk/ppb_flash_clipboard_thunk.cc:20: FLASH_CLIPBOARD_SINGLETON_ID); Note that we could make this even easier ...
8 years, 1 month ago (2012-11-20 21:14:59 UTC) #2
yzshen1
Some drive-by comments. https://codereview.chromium.org/11359063/diff/4014/ppapi/proxy/plugin_dispatcher.h File ppapi/proxy/plugin_dispatcher.h (right): https://codereview.chromium.org/11359063/diff/4014/ppapi/proxy/plugin_dispatcher.h#newcode56 ppapi/proxy/plugin_dispatcher.h:56: typedef std::map<SingletonResourceID, linked_ptr<Resource> > Resource itself ...
8 years, 1 month ago (2012-11-20 21:47:25 UTC) #3
raymes
https://codereview.chromium.org/11359063/diff/4014/ppapi/proxy/plugin_dispatcher.h File ppapi/proxy/plugin_dispatcher.h (right): https://codereview.chromium.org/11359063/diff/4014/ppapi/proxy/plugin_dispatcher.h#newcode56 ppapi/proxy/plugin_dispatcher.h:56: typedef std::map<SingletonResourceID, linked_ptr<Resource> > On 2012/11/20 21:47:25, yzshen1 wrote: ...
8 years, 1 month ago (2012-11-20 23:30:23 UTC) #4
dmichael (off chromium)
https://codereview.chromium.org/11359063/diff/13002/ppapi/thunk/enter.h File ppapi/thunk/enter.h (right): https://codereview.chromium.org/11359063/diff/13002/ppapi/thunk/enter.h#newcode255 ppapi/thunk/enter.h:255: EnterInstanceAPI(PP_Instance instance) : EnterBase() { nit: explicit https://codereview.chromium.org/11359063/diff/13002/ppapi/thunk/enter.h#newcode256 ppapi/thunk/enter.h:256: ...
8 years, 1 month ago (2012-11-21 17:26:26 UTC) #5
raymes
https://codereview.chromium.org/11359063/diff/13002/ppapi/thunk/enter.h File ppapi/thunk/enter.h (right): https://codereview.chromium.org/11359063/diff/13002/ppapi/thunk/enter.h#newcode255 ppapi/thunk/enter.h:255: EnterInstanceAPI(PP_Instance instance) : EnterBase() { On 2012/11/21 17:26:26, dmichael ...
8 years, 1 month ago (2012-11-21 20:59:10 UTC) #6
dmichael (off chromium)
Nice, lgtm
8 years, 1 month ago (2012-11-21 21:02:38 UTC) #7
brettw
lgtm https://codereview.chromium.org/11359063/diff/13010/ppapi/shared_impl/api_id.h File ppapi/shared_impl/api_id.h (right): https://codereview.chromium.org/11359063/diff/13010/ppapi/shared_impl/api_id.h#newcode80 ppapi/shared_impl/api_id.h:80: enum SingletonResourceID { Can you put this in ...
8 years ago (2012-11-27 05:55:10 UTC) #8
raymes
https://codereview.chromium.org/11359063/diff/13010/ppapi/shared_impl/api_id.h File ppapi/shared_impl/api_id.h (right): https://codereview.chromium.org/11359063/diff/13010/ppapi/shared_impl/api_id.h#newcode80 ppapi/shared_impl/api_id.h:80: enum SingletonResourceID { On 2012/11/27 05:55:10, brettw wrote: > ...
8 years ago (2012-11-27 17:48:45 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/11359063/18004
8 years ago (2012-11-27 17:50:06 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/11359063/11011
8 years ago (2012-11-27 18:00:04 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/11359063/11011
8 years ago (2012-11-28 15:07:47 UTC) #12
commit-bot: I haz the power
Failed to apply patch for ppapi/proxy/ppb_instance_proxy.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years ago (2012-11-28 15:07:52 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/11359063/4039
8 years ago (2012-11-28 17:42:08 UTC) #14
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-11-28 18:02:13 UTC) #15
commit-bot: I haz the power
8 years ago (2012-11-28 18:08:25 UTC) #16

Powered by Google App Engine
This is Rietveld 408576698