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 CHROME_DEFAULT_PLUGIN_PLUGIN_MAIN_H_ | |
6 #define CHROME_DEFAULT_PLUGIN_PLUGIN_MAIN_H_ | |
7 | |
5 #include <algorithm> | 8 #include <algorithm> |
6 | 9 |
7 #include "third_party/npapi/bindings/npapi.h" | 10 #include "third_party/npapi/bindings/npapi.h" |
8 #include "third_party/npapi/bindings/nphostapi.h" | 11 #include "third_party/npapi/bindings/nphostapi.h" |
9 | 12 |
10 namespace default_plugin { | 13 namespace default_plugin { |
11 | 14 |
12 extern NPNetscapeFuncs* g_browser; | 15 extern NPNetscapeFuncs* g_browser; |
13 | 16 |
14 // Standard NPAPI functions. | 17 // Standard NPAPI functions. |
(...skipping 15 matching lines...) Expand all Loading... | |
30 int16_t NPP_HandleEvent(NPP instance, void* event); | 33 int16_t NPP_HandleEvent(NPP instance, void* event); |
31 | 34 |
32 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 35 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
33 NPError API_CALL NP_Initialize(NPNetscapeFuncs* funcs, NPPluginFuncs* p_funcs); | 36 NPError API_CALL NP_Initialize(NPNetscapeFuncs* funcs, NPPluginFuncs* p_funcs); |
34 #else | 37 #else |
35 NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* funcs); | 38 NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* funcs); |
36 NPError API_CALL NP_Initialize(NPNetscapeFuncs* funcs); | 39 NPError API_CALL NP_Initialize(NPNetscapeFuncs* funcs); |
37 #endif | 40 #endif |
38 NPError API_CALL NP_Shutdown(void); | 41 NPError API_CALL NP_Shutdown(void); |
39 | 42 |
43 // Base class for the plugin installer. | |
44 class PluginInstallerBase { | |
jam
2011/08/31 17:34:42
nit: this should go into its own file
ananta
2011/08/31 20:18:14
Done.
| |
45 public: | |
46 PluginInstallerBase(); | |
47 virtual ~PluginInstallerBase(); | |
48 | |
49 bool Initialize(void* module_handle, NPP instance, NPMIMEType mime_type, | |
50 int16 argc, char* argn[], char* argv[]); | |
51 protected: | |
52 int renderer_process_id_; | |
jam
2011/08/31 17:34:42
why not just add getters for derived classes inste
ananta
2011/08/31 20:18:14
Done.
| |
53 int render_view_id_; | |
54 }; | |
55 | |
40 } // default_plugin | 56 } // default_plugin |
57 | |
58 #endif // CHROME_DEFAULT_PLUGIN_PLUGIN_MAIN_H_ | |
OLD | NEW |