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.
5 #ifndef PPAPI_PROXY_PPP_INSTANCE_PROXY_H_
6 #define PPAPI_PROXY_PPP_INSTANCE_PROXY_H_
11 #include "base/memory/scoped_ptr.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/pp_var.h"
15 #include "ppapi/proxy/interface_proxy.h"
16 #include "ppapi/shared_impl/host_resource.h"
17 #include "ppapi/shared_impl/ppp_instance_combined.h"
24 class PPP_Instance_Proxy
: public InterfaceProxy
{
26 explicit PPP_Instance_Proxy(Dispatcher
* dispatcher
);
27 virtual ~PPP_Instance_Proxy();
29 // Return the info for the 1.0 (latest, canonical) version of the interface.
30 static const Info
* GetInfo1_0();
32 PPP_Instance_Combined
* ppp_instance_target() const {
33 return combined_interface_
.get();
36 // InterfaceProxy implementation.
37 virtual bool OnMessageReceived(const IPC::Message
& msg
);
41 void OnMsgDidCreate(PP_Instance instance
,
42 const std::vector
<std::string
>& argn
,
43 const std::vector
<std::string
>& argv
,
45 void OnMsgDidDestroy(PP_Instance instance
);
46 void OnMsgDidChangeView(PP_Instance instance
,
47 const PP_Rect
& position
,
50 PP_Bool flash_fullscreen
);
51 void OnMsgDidChangeFocus(PP_Instance instance
, PP_Bool has_focus
);
52 void OnMsgHandleDocumentLoad(PP_Instance instance
,
53 const HostResource
& url_loader
,
55 scoped_ptr
<PPP_Instance_Combined
> combined_interface_
;
61 #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_