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

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

Issue 605593002: PPAPI: Support sending browser-hosted resources synchronously Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content_browsertests Created 6 years, 1 month 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
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 { 18 namespace ppapi {
19
19 struct FileRefCreateInfo; 20 struct FileRefCreateInfo;
21
22 namespace proxy {
23 struct CompletedBrowserResourceHosts;
20 } 24 }
21 25
26 } // namespace ppapi
27
22 namespace content { 28 namespace content {
23 29
24 class RendererPpapiHost; 30 class RendererPpapiHost;
25 class RenderViewImpl; 31 class RenderViewImpl;
26 32
27 class CONTENT_EXPORT PepperFileChooserHost 33 class CONTENT_EXPORT PepperFileChooserHost
28 : public ppapi::host::ResourceHost, 34 : public ppapi::host::ResourceHost,
29 public base::SupportsWeakPtr<PepperFileChooserHost> { 35 public base::SupportsWeakPtr<PepperFileChooserHost> {
30 public: 36 public:
31 // Structure to store the information about chosen files. 37 // Structure to store the information about chosen files.
(...skipping 16 matching lines...) Expand all
48 54
49 private: 55 private:
50 class CompletionHandler; 56 class CompletionHandler;
51 57
52 int32_t OnShow(ppapi::host::HostMessageContext* context, 58 int32_t OnShow(ppapi::host::HostMessageContext* context,
53 bool save_as, 59 bool save_as,
54 bool open_multiple, 60 bool open_multiple,
55 const std::string& suggested_file_name, 61 const std::string& suggested_file_name,
56 const std::vector<std::string>& accept_mime_types); 62 const std::vector<std::string>& accept_mime_types);
57 63
58 void DidCreateResourceHosts(const std::vector<base::FilePath>& file_paths, 64 void DidCreateResourceHosts(
59 const std::vector<std::string>& display_names, 65 const std::vector<base::FilePath>& file_paths,
60 const std::vector<int>& browser_ids); 66 const std::vector<std::string>& display_names,
67 const ppapi::proxy::CompletedBrowserResourceHosts& browser_ids);
61 68
62 // Non-owning pointer. 69 // Non-owning pointer.
63 RendererPpapiHost* renderer_ppapi_host_; 70 RendererPpapiHost* renderer_ppapi_host_;
64 71
65 ppapi::host::ReplyMessageContext reply_context_; 72 ppapi::host::ReplyMessageContext reply_context_;
66 CompletionHandler* handler_; 73 CompletionHandler* handler_;
67 74
68 base::WeakPtrFactory<PepperFileChooserHost> weak_factory_; 75 base::WeakPtrFactory<PepperFileChooserHost> weak_factory_;
69 76
70 DISALLOW_COPY_AND_ASSIGN(PepperFileChooserHost); 77 DISALLOW_COPY_AND_ASSIGN(PepperFileChooserHost);
71 }; 78 };
72 79
73 } // namespace content 80 } // namespace content
74 81
75 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FILE_CHOOSER_HOST_H_ 82 #endif // CONTENT_RENDERER_PEPPER_PEPPER_FILE_CHOOSER_HOST_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_browser_connection.cc ('k') | content/renderer/pepper/pepper_file_chooser_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698