Increase MessageAttachmentSet::kMaxDescriptorsPerMessage to 128
[chromium-blink-merge.git] / ppapi / cpp / mouse_cursor.cc
blobacef57a0b6e2d3a49b2e66282ed0c7b9e4e64e78
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ppapi/cpp/mouse_cursor.h"
7 #include "ppapi/cpp/module_impl.h"
9 namespace pp {
11 namespace {
13 template <> const char* interface_name<PPB_MouseCursor_1_0>() {
14 return PPB_MOUSECURSOR_INTERFACE_1_0;
17 } // namespace
19 // static
20 bool MouseCursor::SetCursor(const InstanceHandle& instance,
21 PP_MouseCursor_Type type,
22 const ImageData& image,
23 const Point& hot_spot) {
24 if (!has_interface<PPB_MouseCursor_1_0>())
25 return false;
26 return PP_ToBool(get_interface<PPB_MouseCursor_1_0>()->SetCursor(
27 instance.pp_instance(), type, image.pp_resource(),
28 &hot_spot.pp_point()));
31 } // namespace pp