summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 19:19:13 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 19:19:13 +0000
commit41869539b903260815feae1501a29cbc470c3d20 (patch)
treee861f1a724b7376e587764d9539c687f92e893e8 /webkit
parentc47fd22e35db0e214a973c125ba24a48e4901219 (diff)
downloadchromium_src-41869539b903260815feae1501a29cbc470c3d20.zip
chromium_src-41869539b903260815feae1501a29cbc470c3d20.tar.gz
chromium_src-41869539b903260815feae1501a29cbc470c3d20.tar.bz2
Pin the PPAPI custom cursor value. PPAPI is intended to be frozen, so make space now for expanding the number of named cursors.
BUG=73356 TEST=no visible change; PPAPI custom cursors are currently not implemented anyway Review URL: http://codereview.chromium.org/6576034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75928 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc11
-rw-r--r--webkit/plugins/ppapi/ppb_cursor_control_impl.cc3
2 files changed, 11 insertions, 3 deletions
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 421d676..bd4264c 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -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(TypeNone, PP_CURSORTYPE_NONE);
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::BindGraphics(PP_Resource graphics_id) {
}
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;
}
diff --git a/webkit/plugins/ppapi/ppb_cursor_control_impl.cc b/webkit/plugins/ppapi/ppb_cursor_control_impl.cc
index d7b5119..83c004d 100644
--- a/webkit/plugins/ppapi/ppb_cursor_control_impl.cc
+++ b/webkit/plugins/ppapi/ppb_cursor_control_impl.cc
@@ -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.
@@ -32,6 +32,7 @@ PP_Bool SetCursor(PP_Instance instance_id,
Resource::GetAs<PPB_ImageData_Impl>(custom_image_id));
if (custom_image.get()) {
// TODO(neb): implement custom cursors.
+ // (Remember that PP_CURSORTYPE_CUSTOM != WebCursorInfo::TypeCustom.)
NOTIMPLEMENTED();
return PP_FALSE;
}