OLD | NEW |
---|---|
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // TODO: Need to deal with NPAPI's NPSavedData. | 5 // TODO: Need to deal with NPAPI's NPSavedData. |
6 // I haven't seen plugins use it yet. | 6 // I haven't seen plugins use it yet. |
7 | 7 |
8 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 8 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
9 #define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 9 #define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 #include <stack> | 13 #include <stack> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/file_path.h" | 16 #include "base/file_path.h" |
17 #include "base/ref_counted.h" | 17 #include "base/ref_counted.h" |
18 #include "base/scoped_ptr.h" | 18 #include "base/scoped_ptr.h" |
19 #include "build/build_config.h" | |
darin (slow to review)
2009/03/04 16:37:01
nit: there's no need to include build_config.h her
| |
19 #include "webkit/glue/plugins/nphostapi.h" | 20 #include "webkit/glue/plugins/nphostapi.h" |
20 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
21 #include "third_party/npapi/bindings/npapi.h" | 22 #include "third_party/npapi/bindings/npapi.h" |
22 | 23 |
23 class WebPlugin; | 24 class WebPlugin; |
24 class MessageLoop; | 25 class MessageLoop; |
25 | 26 |
26 namespace NPAPI | 27 namespace NPAPI |
27 { | 28 { |
28 class PluginLib; | 29 class PluginLib; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 | 93 |
93 // Get the mimeType for this plugin stream | 94 // Get the mimeType for this plugin stream |
94 const std::string &mime_type() { return mime_type_; } | 95 const std::string &mime_type() { return mime_type_; } |
95 | 96 |
96 NPAPI::PluginLib* plugin_lib() { return plugin_; } | 97 NPAPI::PluginLib* plugin_lib() { return plugin_; } |
97 | 98 |
98 #if defined(OS_WIN) | 99 #if defined(OS_WIN) |
99 // Handles a windows native message which this PluginInstance should deal | 100 // Handles a windows native message which this PluginInstance should deal |
100 // with. Returns true if the event is handled, false otherwise. | 101 // with. Returns true if the event is handled, false otherwise. |
101 bool HandleEvent(UINT message, WPARAM wParam, LPARAM lParam); | 102 bool HandleEvent(UINT message, WPARAM wParam, LPARAM lParam); |
103 #elif defined(OS_LINUX) | |
104 bool HandleEvent(union _XEvent* event); | |
102 #endif | 105 #endif |
103 | 106 |
104 // Creates a stream for sending an URL. If notify_needed | 107 // Creates a stream for sending an URL. If notify_needed |
105 // is true, it will send a notification to the plugin | 108 // is true, it will send a notification to the plugin |
106 // when the stream is complete; otherwise it will not. | 109 // when the stream is complete; otherwise it will not. |
107 // Set object_url to true if the load is for the object tag's | 110 // Set object_url to true if the load is for the object tag's |
108 // url, or false if it's for a url that the plugin | 111 // url, or false if it's for a url that the plugin |
109 // fetched through NPN_GetUrl[Notify]. | 112 // fetched through NPN_GetUrl[Notify]. |
110 PluginStreamUrl *CreateStream(int resource_id, | 113 PluginStreamUrl *CreateStream(int resource_id, |
111 const std::string &url, | 114 const std::string &url, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 // List of files created for the current plugin instance. File names are | 255 // List of files created for the current plugin instance. File names are |
253 // added to the list every time the NPP_StreamAsFile function is called. | 256 // added to the list every time the NPP_StreamAsFile function is called. |
254 std::vector<FilePath> files_created_; | 257 std::vector<FilePath> files_created_; |
255 | 258 |
256 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); | 259 DISALLOW_EVIL_CONSTRUCTORS(PluginInstance); |
257 }; | 260 }; |
258 | 261 |
259 } // namespace NPAPI | 262 } // namespace NPAPI |
260 | 263 |
261 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ | 264 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__ |
OLD | NEW |