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 #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ | 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ |
6 #define WEBKIT_GLUE_WEBPLUGIN_H__ | 6 #define WEBKIT_GLUE_WEBPLUGIN_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 WebPlugin() { } | 82 WebPlugin() { } |
83 virtual ~WebPlugin() { } | 83 virtual ~WebPlugin() { } |
84 | 84 |
85 // Called by the plugin delegate to let the WebPlugin know if the plugin is | 85 // Called by the plugin delegate to let the WebPlugin know if the plugin is |
86 // windowed (i.e. handle is not NULL) or windowless (handle is NULL). This | 86 // windowed (i.e. handle is not NULL) or windowless (handle is NULL). This |
87 // tells the WebPlugin to send mouse/keyboard events to the plugin delegate, | 87 // tells the WebPlugin to send mouse/keyboard events to the plugin delegate, |
88 // as well as the information about the HDC for paint operations. | 88 // as well as the information about the HDC for paint operations. |
89 // The pump_messages_event is a event handle which is valid only for | 89 // The pump_messages_event is a event handle which is valid only for |
90 // windowless plugins and is used in NPP_HandleEvent calls to pump messages | 90 // windowless plugins and is used in NPP_HandleEvent calls to pump messages |
91 // if the plugin enters a modal loop. | 91 // if the plugin enters a modal loop. |
92 virtual void SetWindow(gfx::NativeView window, | 92 // The return value is only valid for windowed plugins. If true, it means |
| 93 // that the the HWND position should be managed by the delegate. If false, |
| 94 // the plugin should be kept at the origin and it'll get moved elsewhere. |
| 95 virtual bool SetWindow(gfx::NativeView window, |
93 HANDLE pump_messages_event) = 0; | 96 HANDLE pump_messages_event) = 0; |
94 // Cancels a pending request. | 97 // Cancels a pending request. |
95 virtual void CancelResource(int id) = 0; | 98 virtual void CancelResource(int id) = 0; |
96 virtual void Invalidate() = 0; | 99 virtual void Invalidate() = 0; |
97 virtual void InvalidateRect(const gfx::Rect& rect) = 0; | 100 virtual void InvalidateRect(const gfx::Rect& rect) = 0; |
98 | 101 |
99 // Returns the NPObject for the browser's window object. | 102 // Returns the NPObject for the browser's window object. |
100 virtual NPObject* GetWindowScriptNPObject() = 0; | 103 virtual NPObject* GetWindowScriptNPObject() = 0; |
101 | 104 |
102 // Returns the DOM element that loaded the plugin. | 105 // Returns the DOM element that loaded the plugin. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 bool* cancel) = 0; | 163 bool* cancel) = 0; |
161 virtual void DidReceiveData(const char* buffer, int length, | 164 virtual void DidReceiveData(const char* buffer, int length, |
162 int data_offset) = 0; | 165 int data_offset) = 0; |
163 virtual void DidFinishLoading() = 0; | 166 virtual void DidFinishLoading() = 0; |
164 virtual void DidFail() = 0; | 167 virtual void DidFail() = 0; |
165 virtual bool IsMultiByteResponseExpected() = 0; | 168 virtual bool IsMultiByteResponseExpected() = 0; |
166 }; | 169 }; |
167 | 170 |
168 | 171 |
169 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ | 172 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ |
OLD | NEW |