Add ICU message format support
[chromium-blink-merge.git] / content / common / cursors / webcursor_aurawin.cc
blob23aec8f19a07d5d518fdcce559092b7e784cfd49
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"
7 #include <windows.h>
9 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
10 #include "ui/gfx/icon_util.h"
12 namespace content {
14 ui::PlatformCursor WebCursor::GetPlatformCursor() {
15 if (!IsCustom())
16 return LoadCursor(NULL, IDC_ARROW);
18 if (custom_cursor_)
19 return custom_cursor_;
21 custom_cursor_ =
22 IconUtil::CreateCursorFromDIB(
23 custom_size_,
24 hotspot_,
25 !custom_data_.empty() ? &custom_data_[0] : NULL,
26 custom_data_.size());
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 {
39 return true;
42 bool WebCursor::DeserializePlatformData(base::PickleIterator* iter) {
43 return true;
46 bool WebCursor::IsPlatformDataEqual(const WebCursor& other) const {
47 return true;
50 void WebCursor::CleanupPlatformData() {
51 if (custom_cursor_) {
52 DestroyIcon(custom_cursor_);
53 custom_cursor_ = NULL;
57 void WebCursor::CopyPlatformData(const WebCursor& other) {
60 } // namespace content