OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 21 matching lines...) Expand all Loading... |
32 #define WebPlugin_h | 32 #define WebPlugin_h |
33 | 33 |
34 #include "WebCanvas.h" | 34 #include "WebCanvas.h" |
35 | 35 |
36 struct NPObject; | 36 struct NPObject; |
37 | 37 |
38 namespace WebKit { | 38 namespace WebKit { |
39 class WebDataSource; | 39 class WebDataSource; |
40 class WebFrame; | 40 class WebFrame; |
41 class WebInputEvent; | 41 class WebInputEvent; |
| 42 class WebPluginContainer; |
42 class WebURL; | 43 class WebURL; |
43 class WebURLResponse; | 44 class WebURLResponse; |
44 struct WebCursorInfo; | 45 struct WebCursorInfo; |
| 46 struct WebPluginParams; |
45 struct WebRect; | 47 struct WebRect; |
46 struct WebURLError; | 48 struct WebURLError; |
47 template <typename T> class WebVector; | 49 template <typename T> class WebVector; |
48 | 50 |
49 class WebPlugin { | 51 class WebPlugin { |
50 public: | 52 public: |
| 53 virtual bool initialize(WebPluginContainer*) = 0; |
51 virtual void destroy() = 0; | 54 virtual void destroy() = 0; |
52 | 55 |
53 virtual NPObject* scriptableObject() = 0; | 56 virtual NPObject* scriptableObject() = 0; |
54 | 57 |
55 virtual void paint(WebCanvas*, const WebRect&) = 0; | 58 virtual void paint(WebCanvas*, const WebRect&) = 0; |
56 | 59 |
57 // Coordinates are relative to the containing window. | 60 // Coordinates are relative to the containing window. |
58 virtual void updateGeometry( | 61 virtual void updateGeometry( |
59 const WebRect& frameRect, const WebRect& clipRect, | 62 const WebRect& frameRect, const WebRect& clipRect, |
60 const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0; | 63 const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0; |
(...skipping 15 matching lines...) Expand all Loading... |
76 virtual void didFailLoadingFrameRequest( | 79 virtual void didFailLoadingFrameRequest( |
77 const WebURL&, void* notifyData, const WebURLError&) = 0; | 80 const WebURL&, void* notifyData, const WebURLError&) = 0; |
78 | 81 |
79 protected: | 82 protected: |
80 ~WebPlugin() { } | 83 ~WebPlugin() { } |
81 }; | 84 }; |
82 | 85 |
83 } // namespace WebKit | 86 } // namespace WebKit |
84 | 87 |
85 #endif | 88 #endif |
OLD | NEW |