| Index: trunk/src/ui/wm/core/cursor_manager.cc
|
| ===================================================================
|
| --- trunk/src/ui/wm/core/cursor_manager.cc (revision 263047)
|
| +++ trunk/src/ui/wm/core/cursor_manager.cc (working copy)
|
| @@ -21,6 +21,7 @@
|
| CursorState()
|
| : cursor_(ui::kCursorNone),
|
| visible_(true),
|
| + scale_(1.f),
|
| cursor_set_(ui::CURSOR_SET_NORMAL),
|
| mouse_events_enabled_(true),
|
| visible_on_mouse_events_enabled_(true) {
|
| @@ -36,6 +37,11 @@
|
| // Ignores the call when mouse events disabled.
|
| }
|
|
|
| + float scale() const { return scale_; }
|
| + void set_scale(float scale) {
|
| + scale_ = scale;
|
| + }
|
| +
|
| ui::CursorSetType cursor_set() const { return cursor_set_; }
|
| void set_cursor_set(ui::CursorSetType cursor_set) {
|
| cursor_set_ = cursor_set;
|
| @@ -59,6 +65,7 @@
|
| private:
|
| gfx::NativeCursor cursor_;
|
| bool visible_;
|
| + float scale_;
|
| ui::CursorSetType cursor_set_;
|
| bool mouse_events_enabled_;
|
|
|
| @@ -116,6 +123,16 @@
|
| return current_state_->visible();
|
| }
|
|
|
| +void CursorManager::SetScale(float scale) {
|
| + state_on_unlock_->set_scale(scale);
|
| + if (GetScale() != state_on_unlock_->scale())
|
| + delegate_->SetScale(state_on_unlock_->scale(), this);
|
| +}
|
| +
|
| +float CursorManager::GetScale() const {
|
| + return current_state_->scale();
|
| +}
|
| +
|
| void CursorManager::SetCursorSet(ui::CursorSetType cursor_set) {
|
| state_on_unlock_->set_cursor_set(cursor_set);
|
| if (GetCursorSet() != state_on_unlock_->cursor_set())
|
| @@ -206,6 +223,10 @@
|
| current_state_->SetVisible(visible);
|
| }
|
|
|
| +void CursorManager::CommitScale(float scale) {
|
| + current_state_->set_scale(scale);
|
| +}
|
| +
|
| void CursorManager::CommitCursorSet(ui::CursorSetType cursor_set) {
|
| current_state_->set_cursor_set(cursor_set);
|
| }
|
|
|