| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PLUGINS_NPAPI_WEBPLUGIN_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "ui/gfx/gl/gpu_preference.h" | 12 #include "ui/gfx/gl/gpu_preference.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
| 15 | 15 |
| 16 // TODO(port): this typedef is obviously incorrect on non-Windows | 16 // TODO(port): this typedef is obviously incorrect on non-Windows |
| 17 // platforms, but now a lot of code now accidentally depends on them | 17 // platforms, but now a lot of code now accidentally depends on them |
| 18 // existing. #ifdef out these declarations and fix all the users. | 18 // existing. #ifdef out these declarations and fix all the users. |
| 19 typedef void* HANDLE; | 19 typedef void* HANDLE; |
| 20 | 20 |
| 21 class GURL; | 21 class GURL; |
| 22 struct NPObject; | 22 struct NPObject; |
| 23 | 23 |
| 24 namespace WebKit { | |
| 25 class WebFrame; | |
| 26 } | |
| 27 | |
| 28 namespace webkit { | 24 namespace webkit { |
| 29 namespace npapi { | 25 namespace npapi { |
| 30 | 26 |
| 31 class WebPluginDelegate; | |
| 32 class WebPluginParentView; | |
| 33 class WebPluginResourceClient; | 27 class WebPluginResourceClient; |
| 34 #if defined(OS_MACOSX) | 28 #if defined(OS_MACOSX) |
| 35 class WebPluginAcceleratedSurface; | 29 class WebPluginAcceleratedSurface; |
| 36 #endif | 30 #endif |
| 37 | 31 |
| 38 // Describes the new location for a plugin window. | 32 // Describes the new location for a plugin window. |
| 39 struct WebPluginGeometry { | 33 struct WebPluginGeometry { |
| 40 WebPluginGeometry(); | 34 WebPluginGeometry(); |
| 41 ~WebPluginGeometry(); | 35 ~WebPluginGeometry(); |
| 42 | 36 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 virtual void ResourceClientDeleted( | 133 virtual void ResourceClientDeleted( |
| 140 WebPluginResourceClient* resource_client) {} | 134 WebPluginResourceClient* resource_client) {} |
| 141 | 135 |
| 142 // Defers the loading of the resource identified by resource_id. This is | 136 // Defers the loading of the resource identified by resource_id. This is |
| 143 // controlled by the defer parameter. | 137 // controlled by the defer parameter. |
| 144 virtual void SetDeferResourceLoading(unsigned long resource_id, | 138 virtual void SetDeferResourceLoading(unsigned long resource_id, |
| 145 bool defer) = 0; | 139 bool defer) = 0; |
| 146 | 140 |
| 147 #if defined(OS_MACOSX) | 141 #if defined(OS_MACOSX) |
| 148 // Called to inform the WebPlugin that the plugin has gained or lost focus. | 142 // Called to inform the WebPlugin that the plugin has gained or lost focus. |
| 149 virtual void FocusChanged(bool focused) {}; | 143 virtual void FocusChanged(bool focused) {} |
| 150 | 144 |
| 151 // Starts plugin IME. | 145 // Starts plugin IME. |
| 152 virtual void StartIme() {}; | 146 virtual void StartIme() {} |
| 153 | 147 |
| 154 // Synthesize a fake window handle for the plug-in to identify the instance | 148 // Synthesize a fake window handle for the plug-in to identify the instance |
| 155 // to the browser, allowing mapping to a surface for hardware accelleration | 149 // to the browser, allowing mapping to a surface for hardware accelleration |
| 156 // of plug-in content. The browser generates the handle which is then set on | 150 // of plug-in content. The browser generates the handle which is then set on |
| 157 // the plug-in. |opaque| indicates whether the content should be treated as | 151 // the plug-in. |opaque| indicates whether the content should be treated as |
| 158 // opaque or translucent. | 152 // opaque or translucent. |
| 159 // TODO(stuartmorgan): Move this into WebPluginProxy. | 153 // TODO(stuartmorgan): Move this into WebPluginProxy. |
| 160 virtual void BindFakePluginWindowHandle(bool opaque) {} | 154 virtual void BindFakePluginWindowHandle(bool opaque) {} |
| 161 | 155 |
| 162 // Returns the accelerated surface abstraction for accelerated plugins. | 156 // Returns the accelerated surface abstraction for accelerated plugins. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 186 virtual void DidFinishLoading() = 0; | 180 virtual void DidFinishLoading() = 0; |
| 187 virtual void DidFail() = 0; | 181 virtual void DidFail() = 0; |
| 188 virtual bool IsMultiByteResponseExpected() = 0; | 182 virtual bool IsMultiByteResponseExpected() = 0; |
| 189 virtual int ResourceId() = 0; | 183 virtual int ResourceId() = 0; |
| 190 }; | 184 }; |
| 191 | 185 |
| 192 } // namespace npapi | 186 } // namespace npapi |
| 193 } // namespace webkit | 187 } // namespace webkit |
| 194 | 188 |
| 195 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ | 189 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| OLD | NEW |