| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/wm/core/cursor_manager.h" | 5 #include "ui/wm/core/cursor_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/aura/client/cursor_client_observer.h" | 8 #include "ui/aura/client/cursor_client_observer.h" |
| 9 #include "ui/wm/core/native_cursor_manager.h" | 9 #include "ui/wm/core/native_cursor_manager.h" |
| 10 #include "ui/wm/core/native_cursor_manager_delegate.h" | 10 #include "ui/wm/core/native_cursor_manager_delegate.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Ignores the call when mouse events disabled. | 36 // Ignores the call when mouse events disabled. |
| 37 } | 37 } |
| 38 | 38 |
| 39 ui::CursorSetType cursor_set() const { return cursor_set_; } | 39 ui::CursorSetType cursor_set() const { return cursor_set_; } |
| 40 void set_cursor_set(ui::CursorSetType cursor_set) { | 40 void set_cursor_set(ui::CursorSetType cursor_set) { |
| 41 cursor_set_ = cursor_set; | 41 cursor_set_ = cursor_set; |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool mouse_events_enabled() const { return mouse_events_enabled_; } | 44 bool mouse_events_enabled() const { return mouse_events_enabled_; } |
| 45 void SetMouseEventsEnabled(bool enabled) { | 45 void SetMouseEventsEnabled(bool enabled) { |
| 46 LOG(ERROR) << "CursorState::SetMouseEventsEnabled, enabled=" << enabled; |
| 46 if (mouse_events_enabled_ == enabled) | 47 if (mouse_events_enabled_ == enabled) |
| 47 return; | 48 return; |
| 48 mouse_events_enabled_ = enabled; | 49 mouse_events_enabled_ = enabled; |
| 49 | 50 |
| 50 // Restores the visibility when mouse events are enabled. | 51 // Restores the visibility when mouse events are enabled. |
| 51 if (enabled) { | 52 if (enabled) { |
| 52 visible_ = visible_on_mouse_events_enabled_; | 53 visible_ = visible_on_mouse_events_enabled_; |
| 53 } else { | 54 } else { |
| 54 visible_on_mouse_events_enabled_ = visible_; | 55 visible_on_mouse_events_enabled_ = visible_; |
| 55 visible_ = false; | 56 visible_ = false; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 209 |
| 209 void CursorManager::CommitCursorSet(ui::CursorSetType cursor_set) { | 210 void CursorManager::CommitCursorSet(ui::CursorSetType cursor_set) { |
| 210 current_state_->set_cursor_set(cursor_set); | 211 current_state_->set_cursor_set(cursor_set); |
| 211 } | 212 } |
| 212 | 213 |
| 213 void CursorManager::CommitMouseEventsEnabled(bool enabled) { | 214 void CursorManager::CommitMouseEventsEnabled(bool enabled) { |
| 214 current_state_->SetMouseEventsEnabled(enabled); | 215 current_state_->SetMouseEventsEnabled(enabled); |
| 215 } | 216 } |
| 216 | 217 |
| 217 } // namespace wm | 218 } // namespace wm |
| OLD | NEW |