Revert "[Hotword] Implement IsHotwordHardwareAvailable() using device types."
[chromium-blink-merge.git] / ui / gfx / linux_font_delegate.h
blob517248f52ebd624ddd89a2af84b2f5779b7cdf87
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
3 // found in the LICENSE file.
5 #ifndef UI_GFX_LINUX_FONT_DELEGATE_H_
6 #define UI_GFX_LINUX_FONT_DELEGATE_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/gfx/font_render_params.h"
12 #include "ui/gfx/gfx_export.h"
14 namespace gfx {
16 class ScopedPangoFontDescription;
18 // Allows a Linux platform-specific overriding of font preferences.
19 class GFX_EXPORT LinuxFontDelegate {
20 public:
21 virtual ~LinuxFontDelegate() {}
23 // Sets the dynamically loaded singleton that provides font preferences.
24 // This pointer is not owned, and if this method is called a second time,
25 // the first instance is not deleted.
26 static void SetInstance(LinuxFontDelegate* instance);
28 // Returns a LinuxFontDelegate instance for the toolkit used in
29 // the user's desktop environment.
31 // Can return NULL, in case no toolkit has been set. (For example, if we're
32 // running with the "--ash" flag.)
33 static const LinuxFontDelegate* instance();
35 // Returns the default font rendering settings.
36 virtual FontRenderParams GetDefaultFontRenderParams() const = 0;
38 // Returns the Pango description for the default UI font.
39 virtual scoped_ptr<ScopedPangoFontDescription>
40 GetDefaultPangoFontDescription() const = 0;
42 // Returns the resolution (as pixels-per-inch) that should be used to convert
43 // font sizes between points and pixels. -1 is returned if the DPI is unset.
44 virtual double GetFontDPI() const = 0;
47 } // namespace gfx
49 #endif // UI_GFX_LINUX_FONT_DELEGATE_H_