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

Side by Side Diff: ui/base/cursor/cursor.cc

Issue 9463003: aura-x11: Add custom web cursor support. (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 | « ui/base/cursor/cursor.h ('k') | ui/base/cursor/cursor_win.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 "ui/base/cursor/cursor.h"
6
7 namespace ui {
8
9 Cursor::Cursor()
10 : native_type_(0),
11 platform_cursor_(0) {
12 }
13
14 Cursor::Cursor(int type)
15 : native_type_(type),
16 platform_cursor_(0) {
17 }
18
19 Cursor::Cursor(const Cursor& cursor)
20 : native_type_(cursor.native_type_),
21 platform_cursor_(cursor.platform_cursor_) {
22 if (native_type_ == kCursorCustom)
23 RefCustomCursor();
24 }
25
26 Cursor::~Cursor() {
27 if (native_type_ == kCursorCustom)
28 UnrefCustomCursor();
29 }
30
31 void Cursor::SetPlatformCursor(const PlatformCursor& platform) {
32 if (platform_cursor_)
33 UnrefCustomCursor();
34 native_type_ = kCursorCustom;
35 platform_cursor_ = platform;
36 RefCustomCursor();
37 }
38
39
40 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/cursor/cursor.h ('k') | ui/base/cursor/cursor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698