OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_PROXY_PPP_FIND_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPP_FIND_PROXY_H_ |
6 #define PPAPI_PROXY_PPP_FIND_PROXY_H_ | 6 #define PPAPI_PROXY_PPP_FIND_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/dev/ppp_find_dev.h" | 10 #include "ppapi/c/private/ppp_find_private.h" |
11 #include "ppapi/proxy/interface_proxy.h" | 11 #include "ppapi/proxy/interface_proxy.h" |
12 | 12 |
13 namespace ppapi { | 13 namespace ppapi { |
14 | 14 |
15 namespace proxy { | 15 namespace proxy { |
16 | 16 |
17 class PPP_Find_Proxy : public InterfaceProxy { | 17 class PPP_Find_Proxy : public InterfaceProxy { |
18 public: | 18 public: |
19 explicit PPP_Find_Proxy(Dispatcher* dispatcher); | 19 explicit PPP_Find_Proxy(Dispatcher* dispatcher); |
20 virtual ~PPP_Find_Proxy(); | 20 virtual ~PPP_Find_Proxy(); |
21 | 21 |
22 static const PPP_Find_Dev* GetProxyInterface(); | 22 static const PPP_Find_Private* GetProxyInterface(); |
23 | 23 |
24 // InterfaceProxy implementation. | 24 // InterfaceProxy implementation. |
25 virtual bool OnMessageReceived(const IPC::Message& msg); | 25 virtual bool OnMessageReceived(const IPC::Message& msg); |
26 | 26 |
27 private: | 27 private: |
28 // Message handlers. | 28 // Message handlers. |
29 void OnPluginMsgStartFind(PP_Instance instance, | 29 void OnPluginMsgStartFind(PP_Instance instance, |
30 const std::string& text); | 30 const std::string& text); |
31 void OnPluginMsgSelectFindResult(PP_Instance instance, | 31 void OnPluginMsgSelectFindResult(PP_Instance instance, |
32 PP_Bool forward); | 32 PP_Bool forward); |
33 void OnPluginMsgStopFind(PP_Instance instance); | 33 void OnPluginMsgStopFind(PP_Instance instance); |
34 | 34 |
35 // When this proxy is in the plugin side, this value caches the interface | 35 // When this proxy is in the plugin side, this value caches the interface |
36 // pointer so we don't have to retrieve it from the dispatcher each time. | 36 // pointer so we don't have to retrieve it from the dispatcher each time. |
37 // In the host, this value is always NULL. | 37 // In the host, this value is always NULL. |
38 const PPP_Find_Dev* ppp_find_; | 38 const PPP_Find_Private* ppp_find_; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(PPP_Find_Proxy); | 40 DISALLOW_COPY_AND_ASSIGN(PPP_Find_Proxy); |
41 }; | 41 }; |
42 | 42 |
43 } // namespace proxy | 43 } // namespace proxy |
44 } // namespace ppapi | 44 } // namespace ppapi |
45 | 45 |
46 #endif // PPAPI_PROXY_PPP_FIND_PROXY_H_ | 46 #endif // PPAPI_PROXY_PPP_FIND_PROXY_H_ |
OLD | NEW |