| 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_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_LOADER_UPDATER_H_ | |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CURSOR_LOADER_UPDATER_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "ui/views/views_export.h" | |
| 11 | |
| 12 namespace display { | |
| 13 class Display; | |
| 14 } | |
| 15 | |
| 16 namespace ui { | |
| 17 class CursorLoader; | |
| 18 } | |
| 19 | |
| 20 namespace views { | |
| 21 | |
| 22 // An interface to optionally update the state of a cursor loader. Only used on | |
| 23 // desktop AuraX11. | |
| 24 class VIEWS_EXPORT DesktopCursorLoaderUpdater { | |
| 25 public: | |
| 26 virtual ~DesktopCursorLoaderUpdater() {} | |
| 27 | |
| 28 // Creates a new DesktopCursorLoaderUpdater, or NULL if the platform doesn't | |
| 29 // support one. | |
| 30 static std::unique_ptr<DesktopCursorLoaderUpdater> Create(); | |
| 31 | |
| 32 // Called when a CursorLoader is created. | |
| 33 virtual void OnCreate(float device_scale_factor, | |
| 34 ui::CursorLoader* loader) = 0; | |
| 35 | |
| 36 // Called when the display has changed (as we may need to reload the cursor | |
| 37 // assets in response to a device scale factor or rotation change). | |
| 38 virtual void OnDisplayUpdated(const display::Display& display, | |
| 39 ui::CursorLoader* loader) = 0; | |
| 40 }; | |
| 41 | |
| 42 } // namespace views | |
| 43 | |
| 44 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DISPLAY_CHANGE_HANDLER_H_ | |
| OLD | NEW |