jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 1 | #ifndef _H_Plugin |
| 2 | #define _H_Plugin |
| 3 | /* |
| 4 | * Copyright 2008 Google Inc. |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 7 | * use this file except in compliance with the License. You may obtain a copy of |
| 8 | * the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 15 | * License for the specific language governing permissions and limitations under |
| 16 | * the License. |
| 17 | */ |
| 18 | |
| 19 | #include <vector> |
| 20 | |
| 21 | #include "Debug.h" |
| 22 | |
| 23 | #include "mozincludes.h" |
| 24 | #include "HostChannel.h" |
| 25 | #include "LoadModuleMessage.h" |
| 26 | #include "LocalObjectTable.h" |
| 27 | #include "SessionHandler.h" |
| 28 | #include "HashMap.h" |
| 29 | |
| 30 | using std::vector; |
| 31 | |
| 32 | class ScriptableInstance; |
| 33 | |
| 34 | class Plugin { |
| 35 | friend class JavaObject; |
| 36 | public: |
| 37 | Plugin(NPP); |
| 38 | Plugin(NPP, ScriptableInstance*); |
| 39 | ~Plugin(); |
| 40 | |
| 41 | const NPNetscapeFuncs* getBrowser() { return &GetNPNFuncs(); } |
| 42 | ScriptableInstance* getScriptableInstance() { return scriptableInstance; } |
| 43 | NPP getNPP() { return npp; } |
| 44 | |
| 45 | static const uint32_t VERSION = 1; |
| 46 | private: |
| 47 | |
| 48 | NPP npp; |
| 49 | ScriptableInstance* scriptableInstance; |
| 50 | |
| 51 | NPObject* window; |
| 52 | |
| 53 | }; |
| 54 | |
| 55 | #endif |