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 namespace aura { 9 class RootWindow; 10 } 11 12 namespace gfx { 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 DesktopCursorLoaderUpdater { 25 public: 26 virtual ~DesktopCursorLoaderUpdater() {} 27 28 // Called when a CursorLoader is created. 29 virtual void OnCreate(aura::RootWindow* window, 30 ui::CursorLoader* loader) = 0; 31 32 // Called when the display has changed (as we may need to reload the cursor 33 // assets in response to a device scale factor or rotation change). 34 virtual void OnDisplayUpdated(const gfx::Display& display, 35 ui::CursorLoader* loader) = 0; 36 }; 37 38 } // namespace views 39 40 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DISPLAY_CHANGE_HANDLER_H_ 41