OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_VIEWS_COREWM_CURSOR_PLATFORM_DELEGATE_H_ |
| 6 #define UI_VIEWS_COREWM_CURSOR_PLATFORM_DELEGATE_H_ |
| 7 |
| 8 #include "ui/views/corewm/cursor_manager_delegate.h" |
| 9 #include "ui/views/views_export.h" |
| 10 |
| 11 namespace views { |
| 12 namespace corewm { |
| 13 |
| 14 // Interface where platforms such as Ash or Desktop aura are notified of |
| 15 // requested changes to cursor state. When requested, implementer should tell |
| 16 // the CursorManager of any actual state changes performed through the |
| 17 // delegate. |
| 18 class VIEWS_EXPORT CursorPlatformDelegate { |
| 19 public: |
| 20 virtual ~CursorPlatformDelegate() {} |
| 21 |
| 22 // A request to set the screen DPI. Can cause changes in the current cursor. |
| 23 virtual void SetDeviceScaleFactor( |
| 24 float device_scale_factor, |
| 25 views::corewm::CursorManagerDelegate* delegate) = 0; |
| 26 |
| 27 // A request to set the cursor to |cursor|. At minimum, implementer should |
| 28 // call CursorManagerDelegate::CommitCursor() with whatever cursor is |
| 29 // actually used. |
| 30 virtual void SetCursor(gfx::NativeCursor cursor, |
| 31 views::corewm::CursorManagerDelegate* delegate) = 0; |
| 32 |
| 33 // A request to set the visibility of the cursor. At minimum, implementer |
| 34 // should call CursorManagerDelegate::CommitVisibility() with whatever the |
| 35 // visibility is. |
| 36 virtual void SetVisibility( |
| 37 bool visible, |
| 38 views::corewm::CursorManagerDelegate* delegate) = 0; |
| 39 |
| 40 // A request to set whether mouse events are disabled. At minimum, |
| 41 // implementer should call CursorManagerDelegate::CommitMouseEventsEnabled() |
| 42 // with whether mouse events are actually enabled. |
| 43 virtual void SetMouseEventsEnabled( |
| 44 bool enabled, |
| 45 views::corewm::CursorManagerDelegate* delegate) = 0; |
| 46 }; |
| 47 |
| 48 } // namespace corewm |
| 49 } // namespace views |
| 50 |
| 51 #endif // UI_VIEWS_COREWM_CURSOR_PLATFORM_DELEGATE_H_ |
OLD | NEW |