OLD | NEW |
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_LIBGTK2UI_GTK2_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void RemoveWindowButtonOrderObserver( | 111 void RemoveWindowButtonOrderObserver( |
112 views::WindowButtonOrderObserver* observer) override; | 112 views::WindowButtonOrderObserver* observer) override; |
113 bool UnityIsRunning() override; | 113 bool UnityIsRunning() override; |
114 NonClientMiddleClickAction GetNonClientMiddleClickAction() override; | 114 NonClientMiddleClickAction GetNonClientMiddleClickAction() override; |
115 void NotifyWindowManagerStartupComplete() override; | 115 void NotifyWindowManagerStartupComplete() override; |
116 | 116 |
117 // ui::TextEditKeybindingDelegate: | 117 // ui::TextEditKeybindingDelegate: |
118 bool MatchEvent(const ui::Event& event, | 118 bool MatchEvent(const ui::Event& event, |
119 std::vector<ui::TextEditCommandAuraLinux>* commands) override; | 119 std::vector<ui::TextEditCommandAuraLinux>* commands) override; |
120 | 120 |
| 121 // ui::Views::LinuxUI: |
| 122 void UpdateDeviceScaleFactor(float device_scale_factor) override; |
| 123 |
121 private: | 124 private: |
122 typedef std::map<int, SkColor> ColorMap; | 125 typedef std::map<int, SkColor> ColorMap; |
123 typedef std::map<int, color_utils::HSL> TintMap; | 126 typedef std::map<int, color_utils::HSL> TintMap; |
124 typedef std::map<int, gfx::Image> ImageCache; | 127 typedef std::map<int, gfx::Image> ImageCache; |
125 | 128 |
126 // This method returns the colors webkit will use for the scrollbars. When no | 129 // This method returns the colors webkit will use for the scrollbars. When no |
127 // colors are specified by the GTK+ theme, this function averages of the | 130 // colors are specified by the GTK+ theme, this function averages of the |
128 // thumb part and of the track colors. | 131 // thumb part and of the track colors. |
129 void GetScrollbarColors(GdkColor* thumb_active_color, | 132 void GetScrollbarColors(GdkColor* thumb_active_color, |
130 GdkColor* thumb_inactive_color, | 133 GdkColor* thumb_inactive_color, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 NonClientMiddleClickAction middle_click_action_; | 258 NonClientMiddleClickAction middle_click_action_; |
256 | 259 |
257 // Image cache of lazily created images. | 260 // Image cache of lazily created images. |
258 mutable ImageCache gtk_images_; | 261 mutable ImageCache gtk_images_; |
259 | 262 |
260 // Used to override the native theme for a window. If no override is provided | 263 // Used to override the native theme for a window. If no override is provided |
261 // or the callback returns NULL, Gtk2UI will default to a NativeThemeGtk2 | 264 // or the callback returns NULL, Gtk2UI will default to a NativeThemeGtk2 |
262 // instance. | 265 // instance. |
263 NativeThemeGetter native_theme_overrider_; | 266 NativeThemeGetter native_theme_overrider_; |
264 | 267 |
| 268 float device_scale_factor_; |
| 269 |
265 DISALLOW_COPY_AND_ASSIGN(Gtk2UI); | 270 DISALLOW_COPY_AND_ASSIGN(Gtk2UI); |
266 }; | 271 }; |
267 | 272 |
268 } // namespace libgtk2ui | 273 } // namespace libgtk2ui |
269 | 274 |
270 // Access point to the GTK2 desktop system. This should be the only symbol that | 275 // Access point to the GTK2 desktop system. This should be the only symbol that |
271 // is exported in the library; everything else should be used through the | 276 // is exported in the library; everything else should be used through the |
272 // interface, because eventually this .so will be loaded through dlopen at | 277 // interface, because eventually this .so will be loaded through dlopen at |
273 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or | 278 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or |
274 // QT or whatever. | 279 // QT or whatever. |
275 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); | 280 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); |
276 | 281 |
277 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 282 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
OLD | NEW |