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

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: Remove two tab chars. 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
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..6595fb80d83a90f4acced113f143b3c8304e4c21 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -446,6 +446,19 @@ 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
brettw 2011/09/14 22:17:58 I'd put a blank line above here.
yzshen1 2011/09/19 20:48:41 Done.
+ // 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

Powered by Google App Engine
This is Rietveld 408576698