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

Side by Side Diff: webkit/plugins/ppapi/ppb_file_chooser_impl.h

Issue 9015009: Use the new callback tracker and delete the old one (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add IsPending Created 8 years, 11 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 WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "ppapi/c/dev/ppb_file_chooser_dev.h" 13 #include "ppapi/c/dev/ppb_file_chooser_dev.h"
14 #include "ppapi/shared_impl/resource.h" 14 #include "ppapi/shared_impl/resource.h"
15 #include "ppapi/thunk/ppb_file_chooser_api.h" 15 #include "ppapi/thunk/ppb_file_chooser_api.h"
16 #include "webkit/plugins/webkit_plugins_export.h" 16 #include "webkit/plugins/webkit_plugins_export.h"
17 17
18 struct PP_CompletionCallback; 18 struct PP_CompletionCallback;
19 19
20 namespace ppapi {
21 class TrackedCallback;
22 }
23
20 namespace WebKit { 24 namespace WebKit {
21 class WebString; 25 class WebString;
22 } 26 }
23 27
24 namespace webkit { 28 namespace webkit {
25 namespace ppapi { 29 namespace ppapi {
26 30
27 class PPB_FileRef_Impl; 31 class PPB_FileRef_Impl;
28 class TrackedCompletionCallback;
29 32
30 class PPB_FileChooser_Impl : public ::ppapi::Resource, 33 class PPB_FileChooser_Impl : public ::ppapi::Resource,
31 public ::ppapi::thunk::PPB_FileChooser_API { 34 public ::ppapi::thunk::PPB_FileChooser_API {
32 public: 35 public:
33 PPB_FileChooser_Impl(PP_Instance instance, 36 PPB_FileChooser_Impl(PP_Instance instance,
34 PP_FileChooserMode_Dev mode, 37 PP_FileChooserMode_Dev mode,
35 const char* accept_mime_types); 38 const char* accept_mime_types);
36 virtual ~PPB_FileChooser_Impl(); 39 virtual ~PPB_FileChooser_Impl();
37 40
38 static PP_Resource Create(PP_Instance instance, 41 static PP_Resource Create(PP_Instance instance,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 73
71 // Splits a comma-separated MIME type list |accept_mime_types|, trims the 74 // Splits a comma-separated MIME type list |accept_mime_types|, trims the
72 // resultant split types, makes them lowercase, and returns them. 75 // resultant split types, makes them lowercase, and returns them.
73 // Though this should be private, this is public for testing. 76 // Though this should be private, this is public for testing.
74 WEBKIT_PLUGINS_EXPORT static std::vector<WebKit::WebString> ParseAcceptValue( 77 WEBKIT_PLUGINS_EXPORT static std::vector<WebKit::WebString> ParseAcceptValue(
75 const std::string& accept_mime_types); 78 const std::string& accept_mime_types);
76 79
77 private: 80 private:
78 PP_FileChooserMode_Dev mode_; 81 PP_FileChooserMode_Dev mode_;
79 std::string accept_mime_types_; 82 std::string accept_mime_types_;
80 scoped_refptr<TrackedCompletionCallback> callback_; 83 scoped_refptr< ::ppapi::TrackedCallback> callback_;
81 std::vector< scoped_refptr<PPB_FileRef_Impl> > chosen_files_; 84 std::vector< scoped_refptr<PPB_FileRef_Impl> > chosen_files_;
82 size_t next_chosen_file_index_; 85 size_t next_chosen_file_index_;
83 }; 86 };
84 87
85 } // namespace ppapi 88 } // namespace ppapi
86 } // namespace webkit 89 } // namespace webkit
87 90
88 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_ 91 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_directory_reader_impl.cc ('k') | webkit/plugins/ppapi/ppb_file_chooser_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698