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 "webkit/common/cursors/webcursor.h"
9 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
10 #include "ui/gfx/icon_util.h"
12 const ui::PlatformCursor
WebCursor::GetPlatformCursor() {
14 return LoadCursor(NULL
, IDC_ARROW
);
17 return custom_cursor_
;
20 IconUtil::CreateCursorFromDIB(
23 !custom_data_
.empty() ? &custom_data_
[0] : NULL
,
25 return custom_cursor_
;
28 void WebCursor::SetDisplayInfo(const gfx::Display
& display
) {
29 // TODO(winguru): Add support for scaling the cursor.
32 void WebCursor::InitPlatformData() {
33 custom_cursor_
= NULL
;
36 bool WebCursor::SerializePlatformData(Pickle
* pickle
) const {
40 bool WebCursor::DeserializePlatformData(PickleIterator
* iter
) {
44 bool WebCursor::IsPlatformDataEqual(const WebCursor
& other
) const {
48 void WebCursor::CleanupPlatformData() {
50 DestroyIcon(custom_cursor_
);
51 custom_cursor_
= NULL
;
55 void WebCursor::CopyPlatformData(const WebCursor
& other
) {