Removed 'anonymous' from namespace, added whitespace in thread_restrictions.cc
[chromium-blink-merge.git] / ppapi / proxy / ppp_instance_proxy.h
blob85ae55cbddbecd4bfbf7ae0bb5ecdf2b6639b25f
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_
8 #include <string>
9 #include <vector>
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"
19 struct PP_Rect;
21 namespace ppapi {
23 struct URLResponseInfoData;
24 struct ViewData;
26 namespace proxy {
28 class PPP_Instance_Proxy : public InterfaceProxy {
29 public:
30 explicit PPP_Instance_Proxy(Dispatcher* dispatcher);
31 virtual ~PPP_Instance_Proxy();
33 static const PPP_Instance* GetInstanceInterface();
35 PPP_Instance_Combined* ppp_instance_target() const {
36 return combined_interface_.get();
39 // InterfaceProxy implementation.
40 virtual bool OnMessageReceived(const IPC::Message& msg);
42 private:
43 // Message handlers.
44 void OnPluginMsgDidCreate(PP_Instance instance,
45 const std::vector<std::string>& argn,
46 const std::vector<std::string>& argv,
47 PP_Bool* result);
48 void OnPluginMsgDidDestroy(PP_Instance instance);
49 void OnPluginMsgDidChangeView(PP_Instance instance,
50 const ViewData& new_data,
51 PP_Bool flash_fullscreen);
52 void OnPluginMsgDidChangeFocus(PP_Instance instance, PP_Bool has_focus);
53 void OnPluginMsgHandleDocumentLoad(PP_Instance instance,
54 int pending_loader_host_id,
55 const URLResponseInfoData& data);
57 scoped_ptr<PPP_Instance_Combined> combined_interface_;
60 } // namespace proxy
61 } // namespace ppapi
63 #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_