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

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

Issue 10919135: Move ash specific cursor code to CursorManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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/aura/shared/compound_event_filter_unittest.cc ('k') | ui/base/cursor/cursor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef UI_BASE_CURSOR_CURSOR_H_ 5 #ifndef UI_BASE_CURSOR_CURSOR_H_
6 #define UI_BASE_CURSOR_CURSOR_H_ 6 #define UI_BASE_CURSOR_CURSOR_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/base/ui_export.h" 9 #include "ui/base/ui_export.h"
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 ~Cursor(); 96 ~Cursor();
97 97
98 void SetPlatformCursor(const PlatformCursor& platform); 98 void SetPlatformCursor(const PlatformCursor& platform);
99 99
100 void RefCustomCursor(); 100 void RefCustomCursor();
101 void UnrefCustomCursor(); 101 void UnrefCustomCursor();
102 102
103 int native_type() const { return native_type_; } 103 int native_type() const { return native_type_; }
104 PlatformCursor platform() const { return platform_cursor_; } 104 PlatformCursor platform() const { return platform_cursor_; }
105 float device_scale_factor() const {
106 return device_scale_factor_;
107 }
108 void set_device_scale_factor(float device_scale_factor) {
109 device_scale_factor_ = device_scale_factor;
110 }
105 111
106 bool operator==(int type) const { return native_type_ == type; } 112 bool operator==(int type) const { return native_type_ == type; }
107 bool operator==(const Cursor& cursor) const { 113 bool operator==(const Cursor& cursor) const {
108 return native_type_ == cursor.native_type_ && 114 return native_type_ == cursor.native_type_ &&
109 platform_cursor_ == cursor.platform_cursor_; 115 platform_cursor_ == cursor.platform_cursor_ &&
116 device_scale_factor_ == cursor.device_scale_factor_;
110 } 117 }
111 bool operator!=(int type) const { return native_type_ != type; } 118 bool operator!=(int type) const { return native_type_ != type; }
112 bool operator!=(const Cursor& cursor) const { 119 bool operator!=(const Cursor& cursor) const {
113 return native_type_ != cursor.native_type_ || 120 return native_type_ != cursor.native_type_ ||
114 platform_cursor_ != cursor.platform_cursor_; 121 platform_cursor_ != cursor.platform_cursor_ ||
122 device_scale_factor_ != cursor.device_scale_factor_;
115 } 123 }
116 124
117 void operator=(const Cursor& cursor) { 125 void operator=(const Cursor& cursor) {
118 Assign(cursor); 126 Assign(cursor);
119 } 127 }
120 128
121 private: 129 private:
122 void Assign(const Cursor& cursor); 130 void Assign(const Cursor& cursor);
123 131
124 // See definitions above. 132 // See definitions above.
125 int native_type_; 133 int native_type_;
126 134
127 PlatformCursor platform_cursor_; 135 PlatformCursor platform_cursor_;
136
137 // The device scale factor for the cursor.
138 float device_scale_factor_;
128 }; 139 };
129 140
130 } // namespace ui 141 } // namespace ui
131 142
132 #endif // UI_BASE_CURSOR_CURSOR_H_ 143 #endif // UI_BASE_CURSOR_CURSOR_H_
OLDNEW
« no previous file with comments | « ui/aura/shared/compound_event_filter_unittest.cc ('k') | ui/base/cursor/cursor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698