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

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

Issue 6576034: Pin the PPAPI custom cursor value. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/ppapi_plugin_instance.cc ('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) 2010 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/ppb_cursor_control_impl.h" 5 #include "webkit/plugins/ppapi/ppb_cursor_control_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "ppapi/c/dev/pp_cursor_type_dev.h" 9 #include "ppapi/c/dev/pp_cursor_type_dev.h"
10 #include "ppapi/c/dev/ppb_cursor_control_dev.h" 10 #include "ppapi/c/dev/ppb_cursor_control_dev.h"
11 #include "ppapi/c/pp_point.h" 11 #include "ppapi/c/pp_point.h"
(...skipping 13 matching lines...) Expand all
25 PP_Resource custom_image_id, 25 PP_Resource custom_image_id,
26 const PP_Point* hot_spot) { 26 const PP_Point* hot_spot) {
27 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); 27 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
28 if (!instance) 28 if (!instance)
29 return PP_FALSE; 29 return PP_FALSE;
30 30
31 scoped_refptr<PPB_ImageData_Impl> custom_image( 31 scoped_refptr<PPB_ImageData_Impl> custom_image(
32 Resource::GetAs<PPB_ImageData_Impl>(custom_image_id)); 32 Resource::GetAs<PPB_ImageData_Impl>(custom_image_id));
33 if (custom_image.get()) { 33 if (custom_image.get()) {
34 // TODO(neb): implement custom cursors. 34 // TODO(neb): implement custom cursors.
35 // (Remember that PP_CURSORTYPE_CUSTOM != WebCursorInfo::TypeCustom.)
35 NOTIMPLEMENTED(); 36 NOTIMPLEMENTED();
36 return PP_FALSE; 37 return PP_FALSE;
37 } 38 }
38 39
39 return BoolToPPBool(instance->SetCursor(type)); 40 return BoolToPPBool(instance->SetCursor(type));
40 } 41 }
41 42
42 PP_Bool LockCursor(PP_Instance instance_id) { 43 PP_Bool LockCursor(PP_Instance instance_id) {
43 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); 44 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
44 if (!instance) 45 if (!instance)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 86
86 } // namespace 87 } // namespace
87 88
88 const PPB_CursorControl_Dev* GetCursorControlInterface() { 89 const PPB_CursorControl_Dev* GetCursorControlInterface() {
89 return &cursor_control_interface; 90 return &cursor_control_interface;
90 } 91 }
91 92
92 } // namespace ppapi 93 } // namespace ppapi
93 } // namespace webkit 94 } // namespace webkit
94 95
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698