OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PPAPI_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 class CommandBuffer; | 54 class CommandBuffer; |
55 } | 55 } |
56 | 56 |
57 namespace ppapi { | 57 namespace ppapi { |
58 class PepperFilePath; | 58 class PepperFilePath; |
59 class PPB_HostResolver_Shared; | 59 class PPB_HostResolver_Shared; |
60 class PPB_X509Certificate_Fields; | 60 class PPB_X509Certificate_Fields; |
61 struct DeviceRefData; | 61 struct DeviceRefData; |
62 struct HostPortPair; | 62 struct HostPortPair; |
63 struct Preferences; | 63 struct Preferences; |
| 64 |
| 65 namespace thunk { |
| 66 class ResourceCreationAPI; |
64 } | 67 } |
65 | 68 |
| 69 } // namespace ppapi |
| 70 |
66 namespace skia { | 71 namespace skia { |
67 class PlatformCanvas; | 72 class PlatformCanvas; |
68 } | 73 } |
69 | 74 |
70 namespace WebKit { | 75 namespace WebKit { |
71 class WebFileChooserCompletion; | 76 class WebFileChooserCompletion; |
72 class WebGamepads; | 77 class WebGamepads; |
73 class WebPlugin; | 78 class WebPlugin; |
74 struct WebCompositionUnderline; | 79 struct WebCompositionUnderline; |
75 struct WebCursorInfo; | 80 struct WebCursorInfo; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 virtual void PluginCrashed(PluginInstance* instance) = 0; | 341 virtual void PluginCrashed(PluginInstance* instance) = 0; |
337 | 342 |
338 // Indicates that the given instance has been created. | 343 // Indicates that the given instance has been created. |
339 virtual void InstanceCreated(PluginInstance* instance) = 0; | 344 virtual void InstanceCreated(PluginInstance* instance) = 0; |
340 | 345 |
341 // Indicates that the given instance is being destroyed. This is called from | 346 // Indicates that the given instance is being destroyed. This is called from |
342 // the destructor, so it's important that the instance is not dereferenced | 347 // the destructor, so it's important that the instance is not dereferenced |
343 // from this call. | 348 // from this call. |
344 virtual void InstanceDeleted(PluginInstance* instance) = 0; | 349 virtual void InstanceDeleted(PluginInstance* instance) = 0; |
345 | 350 |
| 351 // Creates the resource creation API for the given instance. |
| 352 virtual scoped_ptr< ::ppapi::thunk::ResourceCreationAPI> |
| 353 CreateResourceCreationAPI(PluginInstance* instance) = 0; |
| 354 |
346 // Returns a pointer (ownership not transferred) to the bitmap to paint the | 355 // Returns a pointer (ownership not transferred) to the bitmap to paint the |
347 // sad plugin screen with. Returns NULL on failure. | 356 // sad plugin screen with. Returns NULL on failure. |
348 virtual SkBitmap* GetSadPluginBitmap() = 0; | 357 virtual SkBitmap* GetSadPluginBitmap() = 0; |
349 | 358 |
350 // Creates a replacement plug-in that is shown when the plug-in at |file_path| | 359 // Creates a replacement plug-in that is shown when the plug-in at |file_path| |
351 // couldn't be loaded. | 360 // couldn't be loaded. |
352 virtual WebKit::WebPlugin* CreatePluginReplacement( | 361 virtual WebKit::WebPlugin* CreatePluginReplacement( |
353 const FilePath& file_path) = 0; | 362 const FilePath& file_path) = 0; |
354 | 363 |
355 // The caller will own the pointer returned from this. | 364 // The caller will own the pointer returned from this. |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; | 657 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; |
649 | 658 |
650 // Returns a Device ID | 659 // Returns a Device ID |
651 virtual std::string GetDeviceID() = 0; | 660 virtual std::string GetDeviceID() = 0; |
652 }; | 661 }; |
653 | 662 |
654 } // namespace ppapi | 663 } // namespace ppapi |
655 } // namespace webkit | 664 } // namespace webkit |
656 | 665 |
657 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 666 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |