Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h

Issue 2504743002: Linux Aura: Fixes and improvements for cursor loader (Closed)
Patch Set: Formatting Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698