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