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

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

Issue 7874002: This patch tries to remove most of the manual registration for Pepper interfaces, and replaces it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/ppb_url_response_info_proxy.cc ('k') | ppapi/proxy/ppb_url_util_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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_PPB_URL_UTIL_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_URL_UTIL_PROXY_H_
6 #define PPAPI_PROXY_PPB_URL_UTIL_PROXY_H_ 6 #define PPAPI_PROXY_PPB_URL_UTIL_PROXY_H_
7 7
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/proxy/interface_proxy.h" 9 #include "ppapi/proxy/interface_proxy.h"
10 #include "ppapi/proxy/serialized_var.h" 10 #include "ppapi/proxy/serialized_var.h"
11 11
12 struct PPB_URLUtil_Dev; 12 struct PPB_URLUtil_Dev;
13 13
14 namespace ppapi { 14 namespace ppapi {
15 namespace proxy { 15 namespace proxy {
16 16
17 class PPB_URLUtil_Proxy : public InterfaceProxy { 17 class PPB_URLUtil_Proxy : public InterfaceProxy {
18 public: 18 public:
19 PPB_URLUtil_Proxy(Dispatcher* dispatcher, const void* target_interface); 19 PPB_URLUtil_Proxy(Dispatcher* dispatcher);
20 virtual ~PPB_URLUtil_Proxy(); 20 virtual ~PPB_URLUtil_Proxy();
21 21
22 static const Info* GetInfo(); 22 static const Info* GetInfo();
23 23
24 const PPB_URLUtil_Dev* ppb_url_util_target() const {
25 return static_cast<const PPB_URLUtil_Dev*>(target_interface());
26 }
27
28 // InterfaceProxy implementation. 24 // InterfaceProxy implementation.
29 virtual bool OnMessageReceived(const IPC::Message& msg); 25 virtual bool OnMessageReceived(const IPC::Message& msg);
30 26
31 private: 27 private:
32 // Message handlers. 28 // Message handlers.
33 void OnMsgResolveRelativeToDocument(PP_Instance instance, 29 void OnMsgResolveRelativeToDocument(PP_Instance instance,
34 SerializedVarReceiveInput relative, 30 SerializedVarReceiveInput relative,
35 SerializedVarReturnValue result); 31 SerializedVarReturnValue result);
36 void OnMsgDocumentCanRequest(PP_Instance instance, 32 void OnMsgDocumentCanRequest(PP_Instance instance,
37 SerializedVarReceiveInput url, 33 SerializedVarReceiveInput url,
38 PP_Bool* result); 34 PP_Bool* result);
39 void OnMsgDocumentCanAccessDocument(PP_Instance active, 35 void OnMsgDocumentCanAccessDocument(PP_Instance active,
40 PP_Instance target, 36 PP_Instance target,
41 PP_Bool* result); 37 PP_Bool* result);
42 void OnMsgGetDocumentURL(PP_Instance instance, 38 void OnMsgGetDocumentURL(PP_Instance instance,
43 SerializedVarReturnValue result); 39 SerializedVarReturnValue result);
44 void OnMsgGetPluginInstanceURL(PP_Instance instance, 40 void OnMsgGetPluginInstanceURL(PP_Instance instance,
45 SerializedVarReturnValue result); 41 SerializedVarReturnValue result);
46 42
43 // When this proxy is in the host side, this value caches the interface
44 // pointer so we don't have to retrieve it from the dispatcher each time.
45 // In the plugin, this value is always NULL.
46 const PPB_URLUtil_Dev* ppb_url_util_impl_;
47
47 DISALLOW_COPY_AND_ASSIGN(PPB_URLUtil_Proxy); 48 DISALLOW_COPY_AND_ASSIGN(PPB_URLUtil_Proxy);
48 }; 49 };
49 50
50 } // namespace proxy 51 } // namespace proxy
51 } // namespace ppapi 52 } // namespace ppapi
52 53
53 #endif // PPAPI_PROXY_PPB_URL_UTIL_PROXY_H_ 54 #endif // PPAPI_PROXY_PPB_URL_UTIL_PROXY_H_
54 55
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_url_response_info_proxy.cc ('k') | ppapi/proxy/ppb_url_util_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698