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 "content/common/cursors/webcursor.h"
9 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
10 #include "ui/gfx/icon_util.h"
14 ui::PlatformCursor
WebCursor::GetPlatformCursor() {
16 return LoadCursor(NULL
, IDC_ARROW
);
19 return custom_cursor_
;
22 IconUtil::CreateCursorFromDIB(
25 !custom_data_
.empty() ? &custom_data_
[0] : NULL
,
27 return custom_cursor_
;
30 void WebCursor::SetDisplayInfo(const gfx::Display
& display
) {
31 // TODO(winguru): Add support for scaling the cursor.
34 void WebCursor::InitPlatformData() {
35 custom_cursor_
= NULL
;
38 bool WebCursor::SerializePlatformData(base::Pickle
* pickle
) const {
42 bool WebCursor::DeserializePlatformData(base::PickleIterator
* iter
) {
46 bool WebCursor::IsPlatformDataEqual(const WebCursor
& other
) const {
50 void WebCursor::CleanupPlatformData() {
52 DestroyIcon(custom_cursor_
);
53 custom_cursor_
= NULL
;
57 void WebCursor::CopyPlatformData(const WebCursor
& other
) {
60 } // namespace content