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

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

Issue 8970016: refactoring mouse lock to support pepper and WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor MouseLockDispatcher out of RenderViewImpl Created 8 years, 11 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 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.

Powered by Google App Engine
This is Rietveld 408576698