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 CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 // Cancels document load. | 60 // Cancels document load. |
61 virtual void CancelDocumentLoad() = 0; | 61 virtual void CancelDocumentLoad() = 0; |
62 | 62 |
63 virtual void DidStartLoading() = 0; | 63 virtual void DidStartLoading() = 0; |
64 virtual void DidStopLoading() = 0; | 64 virtual void DidStopLoading() = 0; |
65 | 65 |
66 // Returns true iff in incognito mode. | 66 // Returns true iff in incognito mode. |
67 virtual bool IsOffTheRecord() = 0; | 67 virtual bool IsOffTheRecord() = 0; |
68 | 68 |
69 #if defined(OS_WIN) | |
70 // |pump_messages_event| is a event handle which is used in NPP_HandleEvent | |
71 // calls to pump messages if the plugin enters a modal loop. | |
72 // |dummy_activation_window} is used to ensure correct keyboard activation. | |
73 // It needs to be a child of the parent window. | |
74 virtual void SetWindowlessData(HANDLE pump_messages_event, | |
75 gfx::NativeViewId dummy_activation_window) = 0; | |
76 #endif | |
77 | |
78 #if defined(OS_MACOSX) | 69 #if defined(OS_MACOSX) |
79 // Called to inform the WebPlugin that the plugin has gained or lost focus. | 70 // Called to inform the WebPlugin that the plugin has gained or lost focus. |
80 virtual void FocusChanged(bool focused) {} | 71 virtual void FocusChanged(bool focused) {} |
81 | 72 |
82 // Starts plugin IME. | 73 // Starts plugin IME. |
83 virtual void StartIme() {} | 74 virtual void StartIme() {} |
84 | 75 |
85 // Returns the accelerated surface abstraction for accelerated plugins. | 76 // Returns the accelerated surface abstraction for accelerated plugins. |
86 virtual WebPluginAcceleratedSurface* GetAcceleratedSurface( | 77 virtual WebPluginAcceleratedSurface* GetAcceleratedSurface( |
87 gfx::GpuPreference gpu_preference) = 0; | 78 gfx::GpuPreference gpu_preference) = 0; |
88 | 79 |
89 // Core Animation plugin support. CA plugins always render through | 80 // Core Animation plugin support. CA plugins always render through |
90 // the compositor. | 81 // the compositor. |
91 virtual void AcceleratedPluginEnabledRendering() = 0; | 82 virtual void AcceleratedPluginEnabledRendering() = 0; |
92 virtual void AcceleratedPluginAllocatedIOSurface(int32_t width, | 83 virtual void AcceleratedPluginAllocatedIOSurface(int32_t width, |
93 int32_t height, | 84 int32_t height, |
94 uint32_t surface_id) = 0; | 85 uint32_t surface_id) = 0; |
95 virtual void AcceleratedPluginSwappedIOSurface() = 0; | 86 virtual void AcceleratedPluginSwappedIOSurface() = 0; |
96 #endif | 87 #endif |
97 }; | 88 }; |
98 | 89 |
99 } // namespace content | 90 } // namespace content |
100 | 91 |
101 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 92 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
OLD | NEW |