11b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov// Copyright (c) 2012 The Chromium Authors. All rights reserved.
21b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov// Use of this source code is governed by a BSD-style license that can be
31b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov// found in the LICENSE file.
41b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov
51b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov#include "ui/base/cursor/cursor.h"
61b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov
71b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov#include "ui/base/x/x11_util.h"
81b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov
91b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukovnamespace ui {
101b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov
111b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukovvoid Cursor::RefCustomCursor() {
121b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov  if (platform_cursor_)
131b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov    ui::RefCustomXCursor(platform_cursor_);
141b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov}
151b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov
16384a448fbe081352f7b3bb927093412ad1725cffSergey Matveevvoid Cursor::UnrefCustomCursor() {
17250f221ae0dee295098da8aa631977b6c2ebc99bEvgeniy Stepanov  if (platform_cursor_)
181b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov    ui::UnrefCustomXCursor(platform_cursor_);
191b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov}
201b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov
211b37017f0216d0b8f3ae3a7dea8b3cc20d74db25Dmitry Vyukov}  // namespace ui
222d1fdb26e458c4ddc04155c1d421bced3ba90cd0Stephen Hines