Index: webkit/plugins/ppapi/plugin_delegate.h |
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h |
index f63276e421e56fc9c31c188488b51e7d2058a296..193777e08f3abd3c335576a5765912697b646d74 100644 |
--- a/webkit/plugins/ppapi/plugin_delegate.h |
+++ b/webkit/plugins/ppapi/plugin_delegate.h |
@@ -446,6 +446,20 @@ 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; |
+ |
+ // Unlocks the mouse if |instance| currently owns the mouse lock. Whenever an |
+ // plugin instance has lost the mouse lock, it will be notified by |
+ // PluginInstance::OnMouseLockLost(). Please note that UnlockMouse() is not |
+ // the only cause of losing mouse lock. For example, a user may press the Esc |
+ // key to quit the mouse lock mode, which also results in an OnMouseLockLost() |
+ // call to the current mouse lock owner. |
+ virtual void UnlockMouse(PluginInstance* instance) = 0; |
}; |
} // namespace ppapi |