Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2930)

Unified Diff: webkit/plugins/ppapi/plugin_delegate.h

Issue 7863003: Mouse lock implementation, including the renderer side and the Windows version of the browser side. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698