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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 const base::string16& tool_tip) const OVERRIDE; | 105 const base::string16& tool_tip) const OVERRIDE; |
106 virtual gfx::Image GetIconForContentType( | 106 virtual gfx::Image GetIconForContentType( |
107 const std::string& content_type, int size) const OVERRIDE; | 107 const std::string& content_type, int size) const OVERRIDE; |
108 virtual scoped_ptr<views::Border> CreateNativeBorder( | 108 virtual scoped_ptr<views::Border> CreateNativeBorder( |
109 views::LabelButton* owning_button, | 109 views::LabelButton* owning_button, |
110 scoped_ptr<views::Border> border) OVERRIDE; | 110 scoped_ptr<views::Border> border) OVERRIDE; |
111 virtual void AddWindowButtonOrderObserver( | 111 virtual void AddWindowButtonOrderObserver( |
112 views::WindowButtonOrderObserver* observer) OVERRIDE; | 112 views::WindowButtonOrderObserver* observer) OVERRIDE; |
113 virtual void RemoveWindowButtonOrderObserver( | 113 virtual void RemoveWindowButtonOrderObserver( |
114 views::WindowButtonOrderObserver* observer) OVERRIDE; | 114 views::WindowButtonOrderObserver* observer) OVERRIDE; |
115 virtual void AddNativeThemeChangeObserver( | |
116 views::NativeThemeChangeObserver* observer) OVERRIDE; | |
117 virtual void RemoveNativeThemeChangeObserver( | |
118 views::NativeThemeChangeObserver* observer) OVERRIDE; | |
119 virtual bool UnityIsRunning() OVERRIDE; | 115 virtual bool UnityIsRunning() OVERRIDE; |
120 virtual NonClientMiddleClickAction GetNonClientMiddleClickAction() OVERRIDE; | 116 virtual NonClientMiddleClickAction GetNonClientMiddleClickAction() OVERRIDE; |
121 virtual void NotifyWindowManagerStartupComplete() OVERRIDE; | 117 virtual void NotifyWindowManagerStartupComplete() OVERRIDE; |
122 | 118 |
123 // ui::TextEditKeybindingDelegate: | 119 // ui::TextEditKeybindingDelegate: |
124 virtual bool MatchEvent( | 120 virtual bool MatchEvent( |
125 const ui::Event& event, | 121 const ui::Event& event, |
126 std::vector<ui::TextEditCommandAuraLinux>* commands) OVERRIDE; | 122 std::vector<ui::TextEditCommandAuraLinux>* commands) OVERRIDE; |
127 | 123 |
128 private: | 124 private: |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // If either of these vectors are non-empty, they represent the current | 240 // If either of these vectors are non-empty, they represent the current |
245 // window button configuration. | 241 // window button configuration. |
246 std::vector<views::FrameButton> leading_buttons_; | 242 std::vector<views::FrameButton> leading_buttons_; |
247 std::vector<views::FrameButton> trailing_buttons_; | 243 std::vector<views::FrameButton> trailing_buttons_; |
248 | 244 |
249 scoped_ptr<Gtk2KeyBindingsHandler> key_bindings_handler_; | 245 scoped_ptr<Gtk2KeyBindingsHandler> key_bindings_handler_; |
250 | 246 |
251 // Objects to notify when the window frame button order changes. | 247 // Objects to notify when the window frame button order changes. |
252 ObserverList<views::WindowButtonOrderObserver> observer_list_; | 248 ObserverList<views::WindowButtonOrderObserver> observer_list_; |
253 | 249 |
254 // Observers to notify when the theme state changes. | |
255 ObserverList<views::NativeThemeChangeObserver> theme_change_observers_; | |
256 | |
257 // Whether we should lower the window on a middle click to the non client | 250 // Whether we should lower the window on a middle click to the non client |
258 // area. | 251 // area. |
259 NonClientMiddleClickAction middle_click_action_; | 252 NonClientMiddleClickAction middle_click_action_; |
260 | 253 |
261 // Image cache of lazily created images. | 254 // Image cache of lazily created images. |
262 mutable ImageCache gtk_images_; | 255 mutable ImageCache gtk_images_; |
263 | 256 |
264 // Used to override the native theme for a window. If no override is provided | 257 // Used to override the native theme for a window. If no override is provided |
265 // or the callback returns NULL, Gtk2UI will default to a NativeThemeGtk2 | 258 // or the callback returns NULL, Gtk2UI will default to a NativeThemeGtk2 |
266 // instance. | 259 // instance. |
267 NativeThemeGetter native_theme_overrider_; | 260 NativeThemeGetter native_theme_overrider_; |
268 | 261 |
269 DISALLOW_COPY_AND_ASSIGN(Gtk2UI); | 262 DISALLOW_COPY_AND_ASSIGN(Gtk2UI); |
270 }; | 263 }; |
271 | 264 |
272 } // namespace libgtk2ui | 265 } // namespace libgtk2ui |
273 | 266 |
274 // Access point to the GTK2 desktop system. This should be the only symbol that | 267 // Access point to the GTK2 desktop system. This should be the only symbol that |
275 // is exported in the library; everything else should be used through the | 268 // is exported in the library; everything else should be used through the |
276 // interface, because eventually this .so will be loaded through dlopen at | 269 // interface, because eventually this .so will be loaded through dlopen at |
277 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or | 270 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or |
278 // QT or whatever. | 271 // QT or whatever. |
279 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); | 272 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); |
280 | 273 |
281 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 274 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
OLD | NEW |