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

Side by Side Diff: ppapi/cpp/mouse_cursor.cc

Issue 9814015: Add new MouseCursor interface for setting the mouse cursor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « ppapi/cpp/mouse_cursor.h ('k') | ppapi/examples/2d/paint_manager_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "ppapi/cpp/mouse_cursor.h"
6
7 #include "ppapi/cpp/module_impl.h"
8
9 namespace pp {
10
11 namespace {
12
13 template <> const char* interface_name<PPB_MouseCursor_1_0>() {
14 return PPB_MOUSECURSOR_INTERFACE_1_0;
15 }
16
17 } // namespace
18
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()));
29 }
30
31 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/mouse_cursor.h ('k') | ppapi/examples/2d/paint_manager_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698