summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/interface_proxy.cc
blob: a474383ffef08b61823b054add9a33229abcc27b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ppapi/proxy/interface_proxy.h"

#include "base/logging.h"
#include "ppapi/proxy/dispatcher.h"

namespace ppapi {
namespace proxy {

InterfaceProxy::InterfaceProxy(Dispatcher* dispatcher,
                               const void* target_interface)
    : dispatcher_(dispatcher),
      target_interface_(target_interface) {
}

InterfaceProxy::~InterfaceProxy() {
}

bool InterfaceProxy::Send(IPC::Message* msg) {
  return dispatcher_->Send(msg);
}

uint32 InterfaceProxy::SendCallback(PP_CompletionCallback callback) {
  return dispatcher_->callback_tracker().SendCallback(callback);
}

PP_CompletionCallback InterfaceProxy::ReceiveCallback(
    uint32 serialized_callback) {
  return dispatcher_->callback_tracker().ReceiveCallback(serialized_callback);
}

}  // namespace proxy
}  // namespace ppapi