OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/cursors/webcursor.h" | 5 #include "content/common/cursors/webcursor.h" |
6 | 6 |
7 #include <X11/cursorfont.h> | 7 #include <X11/cursorfont.h> |
8 #include <X11/Xcursor/Xcursor.h> | 8 #include <X11/Xcursor/Xcursor.h> |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 platform_cursor_ = 0; | 46 platform_cursor_ = 0; |
47 // It is not necessary to recreate platform_cursor_ yet, since it will be | 47 // It is not necessary to recreate platform_cursor_ yet, since it will be |
48 // recreated on demand when GetPlatformCursor is called. | 48 // recreated on demand when GetPlatformCursor is called. |
49 } | 49 } |
50 | 50 |
51 void WebCursor::InitPlatformData() { | 51 void WebCursor::InitPlatformData() { |
52 platform_cursor_ = 0; | 52 platform_cursor_ = 0; |
53 device_scale_factor_ = 1.f; | 53 device_scale_factor_ = 1.f; |
54 } | 54 } |
55 | 55 |
56 bool WebCursor::SerializePlatformData(Pickle* pickle) const { | 56 bool WebCursor::SerializePlatformData(base::Pickle* pickle) const { |
57 return true; | 57 return true; |
58 } | 58 } |
59 | 59 |
60 bool WebCursor::DeserializePlatformData(PickleIterator* iter) { | 60 bool WebCursor::DeserializePlatformData(base::PickleIterator* iter) { |
61 return true; | 61 return true; |
62 } | 62 } |
63 | 63 |
64 bool WebCursor::IsPlatformDataEqual(const WebCursor& other) const { | 64 bool WebCursor::IsPlatformDataEqual(const WebCursor& other) const { |
65 return true; | 65 return true; |
66 } | 66 } |
67 | 67 |
68 void WebCursor::CleanupPlatformData() { | 68 void WebCursor::CleanupPlatformData() { |
69 if (platform_cursor_) { | 69 if (platform_cursor_) { |
70 ui::UnrefCustomXCursor(platform_cursor_); | 70 ui::UnrefCustomXCursor(platform_cursor_); |
71 platform_cursor_ = 0; | 71 platform_cursor_ = 0; |
72 } | 72 } |
73 } | 73 } |
74 | 74 |
75 void WebCursor::CopyPlatformData(const WebCursor& other) { | 75 void WebCursor::CopyPlatformData(const WebCursor& other) { |
76 if (platform_cursor_) | 76 if (platform_cursor_) |
77 ui::UnrefCustomXCursor(platform_cursor_); | 77 ui::UnrefCustomXCursor(platform_cursor_); |
78 platform_cursor_ = other.platform_cursor_; | 78 platform_cursor_ = other.platform_cursor_; |
79 if (platform_cursor_) | 79 if (platform_cursor_) |
80 ui::RefCustomXCursor(platform_cursor_); | 80 ui::RefCustomXCursor(platform_cursor_); |
81 | 81 |
82 device_scale_factor_ = other.device_scale_factor_; | 82 device_scale_factor_ = other.device_scale_factor_; |
83 } | 83 } |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
OLD | NEW |