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 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 | 1513 |
1514 int32_t PluginInstance::LockMouse(PP_Instance instance, | 1514 int32_t PluginInstance::LockMouse(PP_Instance instance, |
1515 PP_CompletionCallback callback) { | 1515 PP_CompletionCallback callback) { |
1516 if (!callback.func) { | 1516 if (!callback.func) { |
1517 // Don't support synchronous call. | 1517 // Don't support synchronous call. |
1518 return PP_ERROR_BADARGUMENT; | 1518 return PP_ERROR_BADARGUMENT; |
1519 } | 1519 } |
1520 if (lock_mouse_callback_.func) | 1520 if (lock_mouse_callback_.func) |
1521 return PP_ERROR_INPROGRESS; | 1521 return PP_ERROR_INPROGRESS; |
1522 | 1522 |
1523 // TODO(yzshen): Uncomment the following lines after adding implementation in | 1523 lock_mouse_callback_ = callback; |
1524 // the delegate. | |
1525 // lock_mouse_callback_ = callback; | |
1526 // We will be notified on completion via OnLockMouseACK(), either | 1524 // We will be notified on completion via OnLockMouseACK(), either |
1527 // synchronously or asynchronously. | 1525 // synchronously or asynchronously. |
1528 // delegate()->LockMouse(this); | 1526 delegate()->LockMouse(this); |
1529 // return PP_OK_COMPLETIONPENDING; | 1527 return PP_OK_COMPLETIONPENDING; |
1530 return PP_ERROR_FAILED; | |
1531 } | 1528 } |
1532 | 1529 |
1533 void PluginInstance::UnlockMouse(PP_Instance instance) { | 1530 void PluginInstance::UnlockMouse(PP_Instance instance) { |
1534 // TODO(yzshen): Uncomment the following after adding implementation in the | 1531 delegate()->UnlockMouse(this); |
1535 // delegate. | |
1536 // delegate()->UnlockMouse(this); | |
1537 } | 1532 } |
1538 | 1533 |
1539 void PluginInstance::SubscribeToPolicyUpdates(PP_Instance instance) { | 1534 void PluginInstance::SubscribeToPolicyUpdates(PP_Instance instance) { |
1540 delegate()->SubscribeToPolicyUpdates(this); | 1535 delegate()->SubscribeToPolicyUpdates(this); |
1541 } | 1536 } |
1542 | 1537 |
1543 void PluginInstance::DoSetCursor(WebCursorInfo* cursor) { | 1538 void PluginInstance::DoSetCursor(WebCursorInfo* cursor) { |
1544 cursor_.reset(cursor); | 1539 cursor_.reset(cursor); |
1545 if (fullscreen_container_) | 1540 if (fullscreen_container_) |
1546 fullscreen_container_->DidChangeCursor(*cursor); | 1541 fullscreen_container_->DidChangeCursor(*cursor); |
1547 } | 1542 } |
1548 | 1543 |
1549 } // namespace ppapi | 1544 } // namespace ppapi |
1550 } // namespace webkit | 1545 } // namespace webkit |
OLD | NEW |