Chromium Code Reviews| 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.h" | 10 #include "base/callback.h" |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 485 // Create an anonymous shared memory segment of size |size| bytes, and return | 485 // Create an anonymous shared memory segment of size |size| bytes, and return |
| 486 // a pointer to it, or NULL on error. Caller owns the returned pointer. | 486 // a pointer to it, or NULL on error. Caller owns the returned pointer. |
| 487 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; | 487 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; |
| 488 | 488 |
| 489 // Returns the current preferences. | 489 // Returns the current preferences. |
| 490 virtual ::ppapi::Preferences GetPreferences() = 0; | 490 virtual ::ppapi::Preferences GetPreferences() = 0; |
| 491 | 491 |
| 492 // Locks the mouse for |instance|. It will call | 492 // Locks the mouse for |instance|. It will call |
| 493 // PluginInstance::OnLockMouseACK() to notify the instance when the operation | 493 // PluginInstance::OnLockMouseACK() to notify the instance when the operation |
| 494 // is completed. The call to OnLockMouseACK() may be synchronous (i.e., it may | 494 // is completed. The call to OnLockMouseACK() may be synchronous (i.e., it may |
| 495 // be called when LockMouse() is still on the stack). | 495 // be called when LockMouse() is still on the stack). |
|
yzshen1
2012/01/04 00:50:00
Please remember to change the comment about when/w
| |
| 496 virtual void LockMouse(PluginInstance* instance) = 0; | 496 virtual bool LockMouse(PluginInstance* instance) = 0; |
| 497 | 497 |
| 498 // Unlocks the mouse if |instance| currently owns the mouse lock. Whenever an | 498 // Unlocks the mouse if |instance| currently owns the mouse lock. Whenever an |
| 499 // plugin instance has lost the mouse lock, it will be notified by | 499 // plugin instance has lost the mouse lock, it will be notified by |
| 500 // PluginInstance::OnMouseLockLost(). Please note that UnlockMouse() is not | 500 // PluginInstance::OnMouseLockLost(). Please note that UnlockMouse() is not |
| 501 // the only cause of losing mouse lock. For example, a user may press the Esc | 501 // the only cause of losing mouse lock. For example, a user may press the Esc |
| 502 // key to quit the mouse lock mode, which also results in an OnMouseLockLost() | 502 // key to quit the mouse lock mode, which also results in an OnMouseLockLost() |
| 503 // call to the current mouse lock owner. | 503 // call to the current mouse lock owner. |
| 504 virtual void UnlockMouse(PluginInstance* instance) = 0; | 504 virtual void UnlockMouse(PluginInstance* instance) = 0; |
| 505 | 505 |
| 506 // Notifies that |instance| has changed the cursor. | 506 // Notifies that |instance| has changed the cursor. |
| 507 // This will update the cursor appearance if it is currently over the plugin | 507 // This will update the cursor appearance if it is currently over the plugin |
| 508 // instance. | 508 // instance. |
| 509 virtual void DidChangeCursor(PluginInstance* instance, | 509 virtual void DidChangeCursor(PluginInstance* instance, |
| 510 const WebKit::WebCursorInfo& cursor) = 0; | 510 const WebKit::WebCursorInfo& cursor) = 0; |
| 511 | 511 |
| 512 // Notifies that |instance| has received a mouse event. | 512 // Notifies that |instance| has received a mouse event. |
| 513 virtual void DidReceiveMouseEvent(PluginInstance* instance) = 0; | 513 virtual void DidReceiveMouseEvent(PluginInstance* instance) = 0; |
| 514 | 514 |
| 515 // Determines if the browser entered fullscreen mode. | 515 // Determines if the browser entered fullscreen mode. |
| 516 virtual bool IsInFullscreenMode() = 0; | 516 virtual bool IsInFullscreenMode() = 0; |
| 517 }; | 517 }; |
| 518 | 518 |
| 519 } // namespace ppapi | 519 } // namespace ppapi |
| 520 } // namespace webkit | 520 } // namespace webkit |
| 521 | 521 |
| 522 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 522 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |