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

Side by Side Diff: ui/views/linux_ui/linux_ui.h

Issue 2963033002: Linux UI: Dynamically respond to changes in the scale factor (Closed)
Patch Set: LinuxUI may not exist in test scenarios Created 3 years, 5 months 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef UI_VIEWS_LINUX_UI_LINUX_UI_H_ 5 #ifndef UI_VIEWS_LINUX_UI_LINUX_UI_H_
6 #define UI_VIEWS_LINUX_UI_LINUX_UI_H_ 6 #define UI_VIEWS_LINUX_UI_LINUX_UI_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 20 matching lines...) Expand all
31 namespace gfx { 31 namespace gfx {
32 class Image; 32 class Image;
33 } 33 }
34 34
35 namespace ui { 35 namespace ui {
36 class NativeTheme; 36 class NativeTheme;
37 } 37 }
38 38
39 namespace views { 39 namespace views {
40 class Border; 40 class Border;
41 class DeviceScaleFactorObserver;
41 class LabelButton; 42 class LabelButton;
42 class LabelButtonBorder; 43 class LabelButtonBorder;
43 class WindowButtonOrderObserver; 44 class WindowButtonOrderObserver;
44 45
45 // Adapter class with targets to render like different toolkits. Set by any 46 // Adapter class with targets to render like different toolkits. Set by any
46 // project that wants to do linux desktop native rendering. 47 // project that wants to do linux desktop native rendering.
47 // 48 //
48 // TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at 49 // TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at
49 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very 50 // minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very
50 // complex method that pokes around with dlopen against a libuigtk2.so, a 51 // complex method that pokes around with dlopen against a libuigtk2.so, a
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // automatically. In case Chromium does not open a new window on startup, 151 // automatically. In case Chromium does not open a new window on startup,
151 // e.g. an existing browser window already exists, this should be called. 152 // e.g. an existing browser window already exists, this should be called.
152 virtual void NotifyWindowManagerStartupComplete() = 0; 153 virtual void NotifyWindowManagerStartupComplete() = 0;
153 154
154 // Updates the device scale factor so that the default font size can be 155 // Updates the device scale factor so that the default font size can be
155 // recalculated. 156 // recalculated.
156 virtual void UpdateDeviceScaleFactor() = 0; 157 virtual void UpdateDeviceScaleFactor() = 0;
157 158
158 // Determines the device scale factor of the primary screen. 159 // Determines the device scale factor of the primary screen.
159 virtual float GetDeviceScaleFactor() const = 0; 160 virtual float GetDeviceScaleFactor() const = 0;
161
162 // Registers |observer| to be notified about changes to the device
163 // scale factor.
164 virtual void AddDeviceScaleFactorObserver(
165 DeviceScaleFactorObserver* observer) = 0;
166
167 // Unregisters |observer| from receiving changes to the device scale
168 // factor.
169 virtual void RemoveDeviceScaleFactorObserver(
170 DeviceScaleFactorObserver* observer) = 0;
160 }; 171 };
161 172
162 } // namespace views 173 } // namespace views
163 174
164 #endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_ 175 #endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_
OLDNEW
« no previous file with comments | « ui/views/linux_ui/device_scale_factor_observer.h ('k') | ui/views/test/desktop_screen_x11_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698