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

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

Issue 8930023: Rev the Flash interface to add new functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years 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
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_FLASH_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_FLASH_PROXY_H_
6 #define PPAPI_PROXY_PPB_FLASH_PROXY_H_ 6 #define PPAPI_PROXY_PPB_FLASH_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ipc/ipc_platform_file.h" 11 #include "ipc/ipc_platform_file.h"
12 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_module.h" 14 #include "ppapi/c/pp_module.h"
14 #include "ppapi/c/pp_time.h" 15 #include "ppapi/c/pp_time.h"
15 #include "ppapi/proxy/interface_proxy.h" 16 #include "ppapi/proxy/interface_proxy.h"
16 #include "ppapi/shared_impl/host_resource.h" 17 #include "ppapi/shared_impl/host_resource.h"
17 18
18 struct PPB_Flash; 19 struct PPB_Flash;
20 struct PPB_Flash_11;
19 21
20 namespace ppapi { 22 namespace ppapi {
21 23
22 struct PPB_URLRequestInfo_Data; 24 struct PPB_URLRequestInfo_Data;
23 25
24 namespace proxy { 26 namespace proxy {
25 27
26 struct PPBFlash_DrawGlyphs_Params; 28 struct PPBFlash_DrawGlyphs_Params;
27 class SerializedVarReturnValue; 29 class SerializedVarReturnValue;
28 30
29 class PPB_Flash_Proxy : public InterfaceProxy { 31 class PPB_Flash_Proxy : public InterfaceProxy {
30 public: 32 public:
31 explicit PPB_Flash_Proxy(Dispatcher* dispatcher); 33 explicit PPB_Flash_Proxy(Dispatcher* dispatcher);
32 virtual ~PPB_Flash_Proxy(); 34 virtual ~PPB_Flash_Proxy();
33 35
34 static const PPB_Flash* GetInterface(); 36 // Returns the corresponding version of the Flash interface pointer.
37 static const PPB_Flash_11* GetInterface11();
38 static const PPB_Flash* GetInterface12();
35 39
36 // InterfaceProxy implementation. 40 // InterfaceProxy implementation.
37 virtual bool OnMessageReceived(const IPC::Message& msg); 41 virtual bool OnMessageReceived(const IPC::Message& msg);
38 42
39 private: 43 private:
40 // Message handlers. 44 // Message handlers.
41 void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance, 45 void OnMsgSetInstanceAlwaysOnTop(PP_Instance instance,
42 PP_Bool on_top); 46 PP_Bool on_top);
43 void OnMsgDrawGlyphs(const PPBFlash_DrawGlyphs_Params& params, 47 void OnMsgDrawGlyphs(const PPBFlash_DrawGlyphs_Params& params,
44 PP_Bool* result); 48 PP_Bool* result);
45 void OnMsgGetProxyForURL(PP_Instance instance, 49 void OnMsgGetProxyForURL(PP_Instance instance,
46 const std::string& url, 50 const std::string& url,
47 SerializedVarReturnValue result); 51 SerializedVarReturnValue result);
48 void OnMsgNavigate(PP_Instance instance, 52 void OnMsgNavigate(PP_Instance instance,
49 const PPB_URLRequestInfo_Data& data, 53 const PPB_URLRequestInfo_Data& data,
50 const std::string& target, 54 const std::string& target,
51 bool from_user_action, 55 PP_Bool from_user_action,
52 int32_t* result); 56 int32_t* result);
53 void OnMsgRunMessageLoop(PP_Instance instance); 57 void OnMsgRunMessageLoop(PP_Instance instance);
54 void OnMsgQuitMessageLoop(PP_Instance instance); 58 void OnMsgQuitMessageLoop(PP_Instance instance);
55 void OnMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t, 59 void OnMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t,
56 double* result); 60 double* result);
57 61
58 // When this proxy is in the host side, this value caches the interface 62 // When this proxy is in the host side, this value caches the interface
59 // pointer so we don't have to retrieve it from the dispatcher each time. 63 // pointer so we don't have to retrieve it from the dispatcher each time.
60 // In the plugin, this value is always NULL. 64 // In the plugin, this value is always NULL.
61 const PPB_Flash* ppb_flash_impl_; 65 const PPB_Flash* ppb_flash_impl_;
62 66
63 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); 67 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy);
64 }; 68 };
65 69
66 } // namespace proxy 70 } // namespace proxy
67 } // namespace ppapi 71 } // namespace ppapi
68 72
69 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ 73 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698