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

Side by Side Diff: trunk/src/content/renderer/pepper/pepper_file_chooser_host.h

Issue 22901012: Revert 218305 "Pepper: Move FileRef to the "new" resource proxy." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_PEPPER_PEPPER_FILE_CHOOSER_HOST_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_FILE_CHOOSER_HOST_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_FILE_CHOOSER_HOST_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_FILE_CHOOSER_HOST_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 "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "ppapi/host/host_message_context.h" 14 #include "ppapi/host/host_message_context.h"
15 #include "ppapi/host/resource_host.h" 15 #include "ppapi/host/resource_host.h"
16 #include "ppapi/proxy/resource_message_params.h" 16 #include "ppapi/proxy/resource_message_params.h"
17 17
18 namespace ppapi {
19 struct FileRefCreateInfo;
20 }
21
22 namespace content { 18 namespace content {
23 19
24 class RendererPpapiHost; 20 class RendererPpapiHost;
25 class RenderViewImpl; 21 class RenderViewImpl;
26 22
27 class CONTENT_EXPORT PepperFileChooserHost 23 class CONTENT_EXPORT PepperFileChooserHost
28 : public ppapi::host::ResourceHost, 24 : public ppapi::host::ResourceHost,
29 public base::SupportsWeakPtr<PepperFileChooserHost> { 25 public base::SupportsWeakPtr<PepperFileChooserHost> {
30 public: 26 public:
31 // Structure to store the information about chosen files. 27 // Structure to store the information about chosen files.
(...skipping 16 matching lines...) Expand all
48 44
49 private: 45 private:
50 class CompletionHandler; 46 class CompletionHandler;
51 47
52 int32_t OnShow(ppapi::host::HostMessageContext* context, 48 int32_t OnShow(ppapi::host::HostMessageContext* context,
53 bool save_as, 49 bool save_as,
54 bool open_multiple, 50 bool open_multiple,
55 const std::string& suggested_file_name, 51 const std::string& suggested_file_name,
56 const std::vector<std::string>& accept_mime_types); 52 const std::vector<std::string>& accept_mime_types);
57 53
58 void DidCreateResourceHost(const base::FilePath& file_path,
59 const std::string& display_name,
60 int32_t id);
61
62 // Non-owning pointer. 54 // Non-owning pointer.
63 RendererPpapiHost* renderer_ppapi_host_; 55 RendererPpapiHost* renderer_ppapi_host_;
64 56
65 int num_pending_file_resources_;
66 std::vector<ppapi::FileRefCreateInfo> chosen_files_;
67
68 ppapi::host::ReplyMessageContext reply_context_; 57 ppapi::host::ReplyMessageContext reply_context_;
69 CompletionHandler* handler_; 58 CompletionHandler* handler_;
70 59
71 base::WeakPtrFactory<PepperFileChooserHost> weak_factory_;
72
73 DISALLOW_COPY_AND_ASSIGN(PepperFileChooserHost); 60 DISALLOW_COPY_AND_ASSIGN(PepperFileChooserHost);
74 }; 61 };
75 62
76 } // namespace content 63 } // namespace content
77 64
78 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FILE_CHOOSER_HOST_H_ 65 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FILE_CHOOSER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698