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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/c/dev/pp_cursor_type_dev.h ('k') | webkit/plugins/ppapi/ppb_cursor_control_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 75887)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -145,7 +145,8 @@
COMPILE_ASSERT_MATCHING_ENUM(TypeNotAllowed, PP_CURSORTYPE_NOTALLOWED);
COMPILE_ASSERT_MATCHING_ENUM(TypeZoomIn, PP_CURSORTYPE_ZOOMIN);
COMPILE_ASSERT_MATCHING_ENUM(TypeZoomOut, PP_CURSORTYPE_ZOOMOUT);
-COMPILE_ASSERT_MATCHING_ENUM(TypeCustom, PP_CURSORTYPE_CUSTOM);
+// Do not assert WebCursorInfo::TypeCustom == PP_CURSORTYPE_CUSTOM;
+// PP_CURSORTYPE_CUSTOM is pinned to allow new cursor types.
void RectToPPRect(const gfx::Rect& input, PP_Rect* output) {
*output = PP_MakeRectFromXYWH(input.x(), input.y(),
@@ -511,6 +512,12 @@
}
bool PluginInstance::SetCursor(PP_CursorType_Dev type) {
+ if (type == PP_CURSORTYPE_CUSTOM) {
+ // TODO(neb): implement custom cursors.
+ // (Remember that PP_CURSORTYPE_CUSTOM != WebCursorInfo::TypeCustom.)
+ NOTIMPLEMENTED();
+ return false;
+ }
cursor_.reset(new WebCursorInfo(static_cast<WebCursorInfo::Type>(type)));
return true;
}
« no previous file with comments | « ppapi/c/dev/pp_cursor_type_dev.h ('k') | webkit/plugins/ppapi/ppb_cursor_control_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698