Chromium Code Reviews| Index: src/trusted/plugin/ppapi/plugin_ppapi.h |
| =================================================================== |
| --- src/trusted/plugin/ppapi/plugin_ppapi.h (revision 4752) |
| +++ src/trusted/plugin/ppapi/plugin_ppapi.h (working copy) |
| @@ -34,6 +34,11 @@ |
| namespace plugin { |
| +// The default MIME type for the NaCl plugin. |
| +// TODO(abarth): This declaration should be in a more general location so it |
| +// can be shared with the NPAPI code. |
|
polina
2011/04/15 06:24:57
what NPAPI code?
abarth-chromium
2011/04/15 06:36:40
Ah, I'm working against an old version of the plug
|
| +extern const char* const kNaClMIMEType; |
| + |
| // Encapsulates a PPAPI NaCl plugin. |
| class PluginPpapi : public pp::Instance, public Plugin { |
| public: |
| @@ -91,6 +96,12 @@ |
| // or NACL_NO_FILE_DESC. The caller must take ownership of the descriptor. |
| int32_t GetPOSIXFileDesc(const nacl::string& url); |
| + // The MIME type used to instantiate this instance of the NaCl plugin. |
| + // Typically, the MIME type will be application/x-nacl. However, if the NEXE |
| + // is being used as a content type handler for another content type (such as |
| + // PDF), then this function will return that type. |
| + const std::string& mime_type() const { return mime_type_; } |
|
polina
2011/04/15 06:24:57
we use nacl::string
abarth-chromium
2011/04/15 06:36:40
Done.
|
| + |
| private: |
| NACL_DISALLOW_COPY_AND_ASSIGN(PluginPpapi); |
| // Prevent construction and destruction from outside the class: |
| @@ -181,6 +192,8 @@ |
| pp::Rect replayDidChangeViewPosition; |
| pp::Rect replayDidChangeViewClip; |
| + std::string mime_type_; |
| + |
| // Keep track of the FileDownloaders created to fetch urls. |
| std::set<FileDownloader*> url_downloaders_; |
| // Keep track of file descriptors opened by StreamAsFile(). |