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

Issue 9666020: Add a private PPB_Talk_Private interface. (Closed)

Created:
8 years, 9 months ago by brettw
Modified:
8 years, 8 months ago
Reviewers:
Josh Horwich, varunjain
CC:
chromium-reviews, jam, yzshen+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, ihf+watch_chromium.org
Visibility:
Public.

Description

Add a private PPB_Talk_Private interface. It exposes one function that sends a message to the browser and issues a reply. The browser doesn't implement this yet. BUG=117564 TEST=

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix semicolon #

Total comments: 1

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+473 lines, -0 lines) Patch
M chrome/renderer/chrome_ppapi_interfaces.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/renderer/chrome_ppb_talk_private_impl.h View 1 2 3 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/renderer/chrome_ppb_talk_private_impl.cc View 1 2 3 4 1 chunk +113 lines, -0 lines 0 comments Download
A ppapi/api/private/ppb_talk_private.idl View 1 chunk +35 lines, -0 lines 0 comments Download
A ppapi/c/private/ppb_talk_private.h View 1 chunk +58 lines, -0 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/ppapi_shared.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/proxy/interface_list.cc View 1 2 3 4 3 chunks +4 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
A ppapi/proxy/ppb_talk_private_proxy.h View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
A ppapi/proxy/ppb_talk_private_proxy.cc View 1 2 3 4 1 chunk +120 lines, -0 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M ppapi/shared_impl/api_id.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/shared_impl/resource.h View 1 chunk +1 line, -0 lines 0 comments Download
A ppapi/thunk/ppb_talk_private_api.h View 1 chunk +23 lines, -0 lines 0 comments Download
M ppapi/thunk/resource_creation_api.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/plugin_module.cc View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/resource_creation_impl.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
brettw
This was more files that I would have liked, oh well. You would hook up ...
8 years, 9 months ago (2012-03-09 21:13:11 UTC) #1
Josh Horwich
This is great! Thank you for the quick turnaround. I'll try using this locally (w/ ...
8 years, 9 months ago (2012-03-09 21:59:33 UTC) #2
varunjain
https://chromiumcodereview.appspot.com/9666020/diff/4001/ppapi/thunk/ppb_talk_private_thunk.cc File ppapi/thunk/ppb_talk_private_thunk.cc (right): https://chromiumcodereview.appspot.com/9666020/diff/4001/ppapi/thunk/ppb_talk_private_thunk.cc#newcode37 ppapi/thunk/ppb_talk_private_thunk.cc:37: const PPB_Talk_Private_1_0* GetPPB_Talk_Private_1_0_Thunk() { needs a PPAPI_THUNK_EXPORT
8 years, 9 months ago (2012-03-09 23:36:31 UTC) #3
brettw
I think I fixed the export issue (a slightly different way). I thought about this ...
8 years, 9 months ago (2012-03-12 04:42:19 UTC) #4
brettw
8 years, 9 months ago (2012-03-12 23:29:44 UTC) #5
Unfortunately, I don't have time to work on this now, and I realistically won't
have any time to program at all until Thursaday at the earliest.

So this is a non-compiling patch that hopefully has the skeleton pieces in
place. Here is how everything should work:


Create call:
  - Calls interface in _proxy.cc. This sends sync create message to renderer
    (see other resources' create messages).
  - Message received by Proxy object. This makes call in browser.
  - Do not use ResourceCreationProxy, get the C interface directly via
    local_get_interface(PPB_TALK_PRIVATE_INTERFACE_1_0).
  - This should call into the implementation of the interface in chrome/renderer

GetPermissionCall:
  - Calls interface in _proxy.cc, sends async message to renderer
  - Message received by proxy object in PPB_Talk_Private_Proxy, calls through
    to object implemented in chrome/renderer.
  - chrome/renderer/chrome/ppb_talk_...cc sends routed message to browser,
  - Add a filter for this message in
chrome/browser/renderer_host/chrome_render_view_host_observer.h
  - Send back ACK message containing host_resource and result int32
  - Talk_Impl object registered itself as a filter for the RenderView in its
    constructor. It checks for this message.
  - When it gets the reply, it ussues the callback.
  - This should call OnGotPermission in the proxy (I sketched this out) which
    was set as the completion callback
  - This sends a message back to the plugin
  - Received in the PPB_Talk_Private_Proxy::OnMsgGetPermissionACK and forwards
    it to the object.

Powered by Google App Engine
This is Rietveld 408576698