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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_old.h" 10 #include "base/callback_old.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // TODO(viettrungluu): Generalize this for use with other plugins if it proves 439 // TODO(viettrungluu): Generalize this for use with other plugins if it proves
440 // necessary. 440 // necessary.
441 virtual std::string GetFlashCommandLineArgs() = 0; 441 virtual std::string GetFlashCommandLineArgs() = 0;
442 442
443 // Create an anonymous shared memory segment of size |size| bytes, and return 443 // Create an anonymous shared memory segment of size |size| bytes, and return
444 // a pointer to it, or NULL on error. Caller owns the returned pointer. 444 // a pointer to it, or NULL on error. Caller owns the returned pointer.
445 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; 445 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0;
446 446
447 // Returns the current preferences. 447 // Returns the current preferences.
448 virtual ::ppapi::Preferences GetPreferences() = 0; 448 virtual ::ppapi::Preferences GetPreferences() = 0;
449
450 // Locks the mouse for |instance|. It will call
451 // PluginInstance::OnLockMouseACK() to notify the instance when the operation
452 // is completed. The call to OnLockMouseACK() may be synchronous (i.e., it may
453 // be called when LockMouse() is still on the stack).
454 virtual void LockMouse(PluginInstance* instance) = 0;
455 // 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.
456 // plugin instance has lost the mouse lock, it will be notified by
457 // PluginInstance::OnMouseLockLost(). Please note that UnlockMouse() is not
458 // the only cause of losing mouse lock. For example, a user may press the Esc
459 // key to quit the mouse lock mode, which also results in an OnMouseLockLost()
460 // call to the current mouse lock owner.
461 virtual void UnlockMouse(PluginInstance* instance) = 0;
449 }; 462 };
450 463
451 } // namespace ppapi 464 } // namespace ppapi
452 } // namespace webkit 465 } // namespace webkit
453 466
454 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ 467 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698