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

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

Issue 7706021: Convert FileRefImpl and URLRequestInfo to shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests fixed Created 9 years, 4 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
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_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" 16 #include "ppapi/thunk/ppb_file_chooser_api.h"
17 17
18 struct PPB_FileChooser_Dev; 18 struct PPB_FileChooser_Dev;
19 19
20 namespace ppapi { 20 namespace ppapi {
21 21
22 class HostResource; 22 class HostResource;
23 struct PPB_FileRef_CreateInfo;
23 24
24 namespace proxy { 25 namespace proxy {
25 26
26 struct PPBFileRef_CreateInfo;
27 class SerializedVarReceiveInput; 27 class SerializedVarReceiveInput;
28 28
29 class PPB_FileChooser_Proxy : public InterfaceProxy { 29 class PPB_FileChooser_Proxy : public InterfaceProxy {
30 public: 30 public:
31 PPB_FileChooser_Proxy(Dispatcher* dispatcher, const void* target_interface); 31 PPB_FileChooser_Proxy(Dispatcher* dispatcher, const void* target_interface);
32 virtual ~PPB_FileChooser_Proxy(); 32 virtual ~PPB_FileChooser_Proxy();
33 33
34 static const Info* GetInfo(); 34 static const Info* GetInfo();
35 static const Info* GetInfo0_4(); 35 static const Info* GetInfo0_4();
36 36
(...skipping 14 matching lines...) Expand all
51 void OnMsgCreate(PP_Instance instance, 51 void OnMsgCreate(PP_Instance instance,
52 int mode, 52 int mode,
53 SerializedVarReceiveInput accept_mime_types, 53 SerializedVarReceiveInput accept_mime_types,
54 ppapi::HostResource* result); 54 ppapi::HostResource* result);
55 void OnMsgShow(const ppapi::HostResource& chooser); 55 void OnMsgShow(const ppapi::HostResource& chooser);
56 56
57 // Host -> plugin message handlers. 57 // Host -> plugin message handlers.
58 void OnMsgChooseComplete( 58 void OnMsgChooseComplete(
59 const ppapi::HostResource& chooser, 59 const ppapi::HostResource& chooser,
60 int32_t result_code, 60 int32_t result_code,
61 const std::vector<PPBFileRef_CreateInfo>& chosen_files); 61 const std::vector<PPB_FileRef_CreateInfo>& chosen_files);
62 62
63 // Called when the show is complete in the host. This will notify the plugin 63 // Called when the show is complete in the host. This will notify the plugin
64 // via IPC and OnMsgChooseComplete will be called there. 64 // via IPC and OnMsgChooseComplete will be called there.
65 void OnShowCallback(int32_t result, const ppapi::HostResource& chooser); 65 void OnShowCallback(int32_t result, const ppapi::HostResource& chooser);
66 66
67 pp::CompletionCallbackFactory<PPB_FileChooser_Proxy, 67 pp::CompletionCallbackFactory<PPB_FileChooser_Proxy,
68 ProxyNonThreadSafeRefCount> callback_factory_; 68 ProxyNonThreadSafeRefCount> callback_factory_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(PPB_FileChooser_Proxy); 70 DISALLOW_COPY_AND_ASSIGN(PPB_FileChooser_Proxy);
71 }; 71 };
72 72
73 } // namespace proxy 73 } // namespace proxy
74 } // namespace ppapi 74 } // namespace ppapi
75 75
76 #endif // PPAPI_PROXY_PPB_FILE_CHOOSER_PROXY_H_ 76 #endif // PPAPI_PROXY_PPB_FILE_CHOOSER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698