| OLD | NEW |
| 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_FILE_CHOOSER_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_FILE_CHOOSER_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_FILE_CHOOSER_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_FILE_CHOOSER_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/cpp/completion_callback.h" | 13 #include "ppapi/cpp/completion_callback.h" |
| 14 #include "ppapi/proxy/interface_proxy.h" | 14 #include "ppapi/proxy/interface_proxy.h" |
| 15 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" | 15 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" |
| 16 #include "ppapi/thunk/ppb_file_chooser_api.h" | |
| 17 | 16 |
| 18 struct PPB_FileChooser_Dev; | 17 struct PPB_FileChooser_Dev; |
| 19 | 18 |
| 20 namespace pp { | 19 namespace pp { |
| 21 namespace proxy { | 20 namespace proxy { |
| 22 | 21 |
| 23 class HostResource; | 22 class HostResource; |
| 24 struct PPBFileRef_CreateInfo; | 23 struct PPBFileRef_CreateInfo; |
| 25 | 24 |
| 26 class PPB_FileChooser_Proxy : public InterfaceProxy { | 25 class PPB_FileChooser_Proxy : public InterfaceProxy { |
| 27 public: | 26 public: |
| 28 PPB_FileChooser_Proxy(Dispatcher* dispatcher, const void* target_interface); | 27 PPB_FileChooser_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 29 virtual ~PPB_FileChooser_Proxy(); | 28 virtual ~PPB_FileChooser_Proxy(); |
| 30 | 29 |
| 31 static const Info* GetInfo(); | 30 static const Info* GetInfo(); |
| 32 | 31 |
| 33 static PP_Resource CreateProxyResource( | |
| 34 PP_Instance instance, | |
| 35 const PP_FileChooserOptions_Dev* options); | |
| 36 | |
| 37 const PPB_FileChooser_Dev* ppb_file_chooser_target() const { | 32 const PPB_FileChooser_Dev* ppb_file_chooser_target() const { |
| 38 return static_cast<const PPB_FileChooser_Dev*>(target_interface()); | 33 return static_cast<const PPB_FileChooser_Dev*>(target_interface()); |
| 39 } | 34 } |
| 40 | 35 |
| 41 // InterfaceProxy implementation. | 36 // InterfaceProxy implementation. |
| 42 virtual bool OnMessageReceived(const IPC::Message& msg); | 37 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 43 | 38 |
| 44 private: | 39 private: |
| 45 // Plugin -> host message handlers. | 40 // Plugin -> host message handlers. |
| 46 void OnMsgCreate(PP_Instance instance, | 41 void OnMsgCreate(PP_Instance instance, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 62 CompletionCallbackFactory<PPB_FileChooser_Proxy, | 57 CompletionCallbackFactory<PPB_FileChooser_Proxy, |
| 63 ProxyNonThreadSafeRefCount> callback_factory_; | 58 ProxyNonThreadSafeRefCount> callback_factory_; |
| 64 | 59 |
| 65 DISALLOW_COPY_AND_ASSIGN(PPB_FileChooser_Proxy); | 60 DISALLOW_COPY_AND_ASSIGN(PPB_FileChooser_Proxy); |
| 66 }; | 61 }; |
| 67 | 62 |
| 68 } // namespace proxy | 63 } // namespace proxy |
| 69 } // namespace pp | 64 } // namespace pp |
| 70 | 65 |
| 71 #endif // PPAPI_PROXY_PPB_FILE_CHOOSER_PROXY_H_ | 66 #endif // PPAPI_PROXY_PPB_FILE_CHOOSER_PROXY_H_ |
| OLD | NEW |