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

Side by Side Diff: ppapi/proxy/ppb_broker_proxy.h

Issue 6833002: Implemented PPB_Broker_Proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_PPB_BROKER_PROXY_H_
6 #define PPAPI_PPB_BROKER_PROXY_H_
7
8 #include "base/sync_socket.h"
9 #include "ipc/ipc_platform_file.h"
10 #include "ppapi/c/pp_instance.h"
11 #include "ppapi/proxy/interface_proxy.h"
12
13 struct PPB_BrokerTrusted;
14
15 namespace pp {
16 namespace proxy {
17
18 class HostResource;
19
20 class PPB_Broker_Proxy : public InterfaceProxy {
21 public:
22 PPB_Broker_Proxy(Dispatcher* dispatcher, const void* target_interface);
23 virtual ~PPB_Broker_Proxy();
24
25 static const Info* GetInfo();
26
27 const PPB_BrokerTrusted* ppb_broker_target() const {
28 return static_cast<const PPB_BrokerTrusted*>(target_interface());
29 }
30
31 // InterfaceProxy implementation.
32 virtual bool OnMessageReceived(const IPC::Message& msg);
33
34 private:
35 // Message handlers.
36 void OnMsgCreate(PP_Instance instance, HostResource* result_resource);
37 void OnMsgConnect(const HostResource& broker, uint32_t serialized_callback);
38 void OnMsgGetHandle(const HostResource& broker,
39 IPC::PlatformFileForTransit* foreign_socket_handle,
40 int32_t* result);
41 };
42
43 } // namespace proxy
44 } // namespace pp
45
46 #endif // PPAPI_PPB_BROKER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698