OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GLUE_PLUGINS_WEBPLUGIN_FILE_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_FILE_DELEGATE_H_ |
6 #define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_FILE_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_FILE_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "third_party/npapi/bindings/npapi_extensions.h" | 9 #include "third_party/npapi/bindings/npapi_extensions.h" |
10 | 10 |
11 namespace webkit_glue { | 11 namespace webkit { |
| 12 namespace npapi { |
12 | 13 |
13 // Interface for the NPAPI file extensions. This class implements "NOP" | 14 // Interface for the NPAPI file extensions. This class implements "NOP" |
14 // versions of all these functions so it can be used seamlessly by the | 15 // versions of all these functions so it can be used seamlessly by the |
15 // "regular" plugin delegate while being overridden by the "pepper" one. | 16 // "regular" plugin delegate while being overridden by the "pepper" one. |
16 class WebPluginFileDelegate { | 17 class WebPluginFileDelegate { |
17 public: | 18 public: |
18 // See NPChooseFilePtr in npapi_extensions.h. Returns true on success, on | 19 // See NPChooseFilePtr in npapi_extensions.h. Returns true on success, on |
19 // cancel, returns true but *filename will be filled with an empty FilePath | 20 // cancel, returns true but *filename will be filled with an empty FilePath |
20 // and *handle will be 0. | 21 // and *handle will be 0. |
21 virtual bool ChooseFile(const char* mime_types, | 22 virtual bool ChooseFile(const char* mime_types, |
22 int mode, | 23 int mode, |
23 NPChooseFileCallback callback, | 24 NPChooseFileCallback callback, |
24 void* user_data) { | 25 void* user_data) { |
25 return false; | 26 return false; |
26 } | 27 } |
27 | 28 |
28 protected: | 29 protected: |
29 WebPluginFileDelegate() {} | 30 WebPluginFileDelegate() {} |
30 virtual ~WebPluginFileDelegate() {} | 31 virtual ~WebPluginFileDelegate() {} |
31 }; | 32 }; |
32 | 33 |
33 } // namespace webkit_glue | 34 } // namespace npapi |
| 35 } // namespace webkit |
34 | 36 |
35 #endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_FILE_DELEGATE_H_ | 37 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_FILE_DELEGATE_H_ |
OLD | NEW |