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

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: Synced, changed enum after syncing, and really fixed the Windows build. 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
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_broker_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/cpp/completion_callback.h"
12 #include "ppapi/proxy/interface_proxy.h"
13 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h"
14
15
16 struct PPB_BrokerTrusted;
17
18 namespace pp {
19 namespace proxy {
20
21 class HostResource;
22
23 class PPB_Broker_Proxy : public InterfaceProxy {
24 public:
25 PPB_Broker_Proxy(Dispatcher* dispatcher, const void* target_interface);
26 virtual ~PPB_Broker_Proxy();
27
28 static const Info* GetInfo();
29
30 const PPB_BrokerTrusted* ppb_broker_target() const {
31 return static_cast<const PPB_BrokerTrusted*>(target_interface());
32 }
33
34 // InterfaceProxy implementation.
35 virtual bool OnMessageReceived(const IPC::Message& msg);
36
37 private:
38 // Message handlers.
39 void OnMsgCreate(PP_Instance instance, HostResource* result_resource);
40 void OnMsgConnect(const HostResource& broker);
41 void OnMsgConnectComplete(const HostResource& broker,
42 IPC::PlatformFileForTransit foreign_socket_handle,
43 int32_t result);
44
45 void ConnectCompleteInHost(int32_t result, const HostResource& host_resource);
46
47 CompletionCallbackFactory<PPB_Broker_Proxy,
48 ProxyNonThreadSafeRefCount> callback_factory_;
49 };
50
51 } // namespace proxy
52 } // namespace pp
53
54 #endif // PPAPI_PPB_BROKER_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_broker_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698