Fix passing pointers between processes.

BUG=31880
Review URL: http://codereview.chromium.org/558036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37555 0039d316-1c4b-4281-b951-d872f2087c98
NPError WebPluginDelegatePepper::Device2DFlushContext(
    NPP id,
    NPDeviceContext2D* context,
    NPDeviceFlushContextCallbackPtr callback,
    void* user_data) {

  if (!context) {
    return NPERR_INVALID_PARAM;
  }

  Graphics2DDeviceContext* ctx = graphic2d_contexts_.Lookup(
      reinterpret_cast<intptr_t>(context->reserved));
  if (!ctx) {
    return NPERR_INVALID_PARAM;  // TODO(brettw) call callback.
  }
  return ctx->Flush(&committed_bitmap_, context, callback, id, user_data);
}

NPError WebPluginDelegatePepper::Device2DFlushContext(
    NPP id,
    NPDeviceContext2D* context,
    NPDeviceFlushContextCallbackPtr callback,
    void* user_data) {

  if (!context) {
    return NPERR_INVALID_PARAM;
  }

  Graphics2DDeviceContext* ctx = graphic2d_contexts_.Lookup(
      reinterpret_cast<intptr_t>(context->reserved));
  if (!ctx) {
    return NPERR_INVALID_PARAM;  // TODO(brettw) call callback.
  }
  return ctx->Flush(&committed_bitmap_, context, callback, id, user_data);
}
