OLD | NEW |
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 Loading... |
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 |
| 456 // Unlocks the mouse if |instance| currently owns the mouse lock. Whenever an |
| 457 // plugin instance has lost the mouse lock, it will be notified by |
| 458 // PluginInstance::OnMouseLockLost(). Please note that UnlockMouse() is not |
| 459 // the only cause of losing mouse lock. For example, a user may press the Esc |
| 460 // key to quit the mouse lock mode, which also results in an OnMouseLockLost() |
| 461 // call to the current mouse lock owner. |
| 462 virtual void UnlockMouse(PluginInstance* instance) = 0; |
449 }; | 463 }; |
450 | 464 |
451 } // namespace ppapi | 465 } // namespace ppapi |
452 } // namespace webkit | 466 } // namespace webkit |
453 | 467 |
454 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 468 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |