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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

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: . 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
« no previous file with comments | « webkit/plugins/ppapi/plugin_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 1577
1578 int32_t PluginInstance::LockMouse(PP_Instance instance, 1578 int32_t PluginInstance::LockMouse(PP_Instance instance,
1579 PP_CompletionCallback callback) { 1579 PP_CompletionCallback callback) {
1580 if (!callback.func) { 1580 if (!callback.func) {
1581 // Don't support synchronous call. 1581 // Don't support synchronous call.
1582 return PP_ERROR_BLOCKS_MAIN_THREAD; 1582 return PP_ERROR_BLOCKS_MAIN_THREAD;
1583 } 1583 }
1584 if (lock_mouse_callback_.func) 1584 if (lock_mouse_callback_.func)
1585 return PP_ERROR_INPROGRESS; 1585 return PP_ERROR_INPROGRESS;
1586 1586
1587 // TODO(yzshen): Uncomment the following lines after adding implementation in 1587 lock_mouse_callback_ = callback;
1588 // the delegate.
1589 // lock_mouse_callback_ = callback;
1590 // We will be notified on completion via OnLockMouseACK(), either 1588 // We will be notified on completion via OnLockMouseACK(), either
1591 // synchronously or asynchronously. 1589 // synchronously or asynchronously.
1592 // delegate()->LockMouse(this); 1590 delegate()->LockMouse(this);
1593 // return PP_OK_COMPLETIONPENDING; 1591 return PP_OK_COMPLETIONPENDING;
1594 return PP_ERROR_FAILED;
1595 } 1592 }
1596 1593
1597 void PluginInstance::UnlockMouse(PP_Instance instance) { 1594 void PluginInstance::UnlockMouse(PP_Instance instance) {
1598 // TODO(yzshen): Uncomment the following after adding implementation in the 1595 delegate()->UnlockMouse(this);
1599 // delegate.
1600 // delegate()->UnlockMouse(this);
1601 } 1596 }
1602 1597
1603 void PluginInstance::SubscribeToPolicyUpdates(PP_Instance instance) { 1598 void PluginInstance::SubscribeToPolicyUpdates(PP_Instance instance) {
1604 delegate()->SubscribeToPolicyUpdates(this); 1599 delegate()->SubscribeToPolicyUpdates(this);
1605 } 1600 }
1606 1601
1607 void PluginInstance::DoSetCursor(WebCursorInfo* cursor) { 1602 void PluginInstance::DoSetCursor(WebCursorInfo* cursor) {
1608 cursor_.reset(cursor); 1603 cursor_.reset(cursor);
1609 if (fullscreen_container_) 1604 if (fullscreen_container_)
1610 fullscreen_container_->DidChangeCursor(*cursor); 1605 fullscreen_container_->DidChangeCursor(*cursor);
1611 } 1606 }
1612 1607
1613 } // namespace ppapi 1608 } // namespace ppapi
1614 } // namespace webkit 1609 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698