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

Side by Side Diff: chrome/browser/ui/libgtkui/gtk_ui.h

Issue 2441043002: [linux] Allow font to use below 1.0f scale (Closed)
Patch Set: Allow font to use below 1.0f scale 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_UI_LIBGTKUI_GTK_UI_H_ 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_GTK_UI_H_
6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_UI_H_ 6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_UI_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 views::WindowButtonOrderObserver* observer) override; 98 views::WindowButtonOrderObserver* observer) override;
99 bool UnityIsRunning() override; 99 bool UnityIsRunning() override;
100 NonClientMiddleClickAction GetNonClientMiddleClickAction() override; 100 NonClientMiddleClickAction GetNonClientMiddleClickAction() override;
101 void NotifyWindowManagerStartupComplete() override; 101 void NotifyWindowManagerStartupComplete() override;
102 102
103 // ui::TextEditKeybindingDelegate: 103 // ui::TextEditKeybindingDelegate:
104 bool MatchEvent(const ui::Event& event, 104 bool MatchEvent(const ui::Event& event,
105 std::vector<ui::TextEditCommandAuraLinux>* commands) override; 105 std::vector<ui::TextEditCommandAuraLinux>* commands) override;
106 106
107 // ui::Views::LinuxUI: 107 // ui::Views::LinuxUI:
108 void UpdateDeviceScaleFactor(float device_scale_factor) override; 108 void UpdateDeviceScaleFactor() override;
109 float GetDeviceScaleFactor() const override; 109 float GetDeviceScaleFactor() const override;
110 110
111 private: 111 private:
112 typedef std::map<int, SkColor> ColorMap; 112 typedef std::map<int, SkColor> ColorMap;
113 typedef std::map<int, color_utils::HSL> TintMap; 113 typedef std::map<int, color_utils::HSL> TintMap;
114 114
115 // This method returns the colors webkit will use for the scrollbars. When no 115 // This method returns the colors webkit will use for the scrollbars. When no
116 // colors are specified by the GTK+ theme, this function averages of the 116 // colors are specified by the GTK+ theme, this function averages of the
117 // thumb part and of the track colors. 117 // thumb part and of the track colors.
118 void SetScrollbarColors(); 118 void SetScrollbarColors();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 // Whether we should lower the window on a middle click to the non client 194 // Whether we should lower the window on a middle click to the non client
195 // area. 195 // area.
196 NonClientMiddleClickAction middle_click_action_; 196 NonClientMiddleClickAction middle_click_action_;
197 197
198 // Used to override the native theme for a window. If no override is provided 198 // Used to override the native theme for a window. If no override is provided
199 // or the callback returns NULL, Gtk2UI will default to a NativeThemeGtk2 199 // or the callback returns NULL, Gtk2UI will default to a NativeThemeGtk2
200 // instance. 200 // instance.
201 NativeThemeGetter native_theme_overrider_; 201 NativeThemeGetter native_theme_overrider_;
202 202
203 float device_scale_factor_; 203 float device_scale_factor_ = 1.0f;
Evan Stade 2016/11/03 16:38:03 seems like we should init things in the same place
oshima 2016/11/05 15:15:05 I moved default_font_xxx to the header.
204 204
205 DISALLOW_COPY_AND_ASSIGN(Gtk2UI); 205 DISALLOW_COPY_AND_ASSIGN(Gtk2UI);
206 }; 206 };
207 207
208 } // namespace libgtkui 208 } // namespace libgtkui
209 209
210 // Access point to the GTK2 desktop system. This should be the only symbol that 210 // Access point to the GTK2 desktop system. This should be the only symbol that
211 // is exported in the library; everything else should be used through the 211 // is exported in the library; everything else should be used through the
212 // interface, because eventually this .so will be loaded through dlopen at 212 // interface, because eventually this .so will be loaded through dlopen at
213 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or 213 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or
214 // QT or whatever. 214 // QT or whatever.
215 LIBGTKUI_EXPORT views::LinuxUI* BuildGtk2UI(); 215 LIBGTKUI_EXPORT views::LinuxUI* BuildGtk2UI();
216 216
217 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UI_H_ 217 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UI_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/libgtkui/gtk_ui.cc » ('j') | chrome/browser/ui/libgtkui/gtk_ui.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698