Index: webkit/plugins/ppapi/plugin_delegate.h |
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h |
index 6f9a17e8c896249253a3835caa77db7044e5f04e..c1a2c8f37744afcecb4f30e1afdd63e0dc2c440f 100644 |
--- a/webkit/plugins/ppapi/plugin_delegate.h |
+++ b/webkit/plugins/ppapi/plugin_delegate.h |
@@ -490,11 +490,11 @@ class PluginDelegate { |
// Returns the current preferences. |
virtual ::ppapi::Preferences GetPreferences() = 0; |
- // Locks the mouse for |instance|. It will call |
- // PluginInstance::OnLockMouseACK() to notify the instance when the operation |
- // is completed. The call to OnLockMouseACK() may be synchronous (i.e., it may |
- // be called when LockMouse() is still on the stack). |
- virtual void LockMouse(PluginInstance* instance) = 0; |
+ // Locks the mouse for |instance|. If false is returned, the lock is not |
+ // possible. If true is returned then the lock is pending. Success or |
+ // failure will be delivered asynchronously via |
+ // PluginInstance::OnLockMouseACK(). |
+ virtual bool LockMouse(PluginInstance* instance) = 0; |
// Unlocks the mouse if |instance| currently owns the mouse lock. Whenever an |
// plugin instance has lost the mouse lock, it will be notified by |
@@ -504,6 +504,9 @@ class PluginDelegate { |
// call to the current mouse lock owner. |
virtual void UnlockMouse(PluginInstance* instance) = 0; |
+ // Returns true iif |instance| currently owns the mouse lock. |
+ virtual bool IsMouseLocked(PluginInstance* instance) = 0; |
+ |
// Notifies that |instance| has changed the cursor. |
// This will update the cursor appearance if it is currently over the plugin |
// instance. |