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

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

Issue 2610883004: Gtk3: Rename Gtk2UI and Get[FB]GColor (Closed)
Patch Set: Rebase Created 3 years, 11 months 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
« no previous file with comments | « chrome/browser/ui/libgtkui/gconf_listener.cc ('k') | chrome/browser/ui/libgtkui/gtk_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "chrome/browser/ui/libgtkui/gtk_signal.h" 15 #include "chrome/browser/ui/libgtkui/gtk_signal.h"
16 #include "chrome/browser/ui/libgtkui/libgtkui_export.h" 16 #include "chrome/browser/ui/libgtkui/libgtkui_export.h"
17 #include "ui/gfx/color_utils.h" 17 #include "ui/gfx/color_utils.h"
18 #include "ui/views/linux_ui/linux_ui.h" 18 #include "ui/views/linux_ui/linux_ui.h"
19 #include "ui/views/window/frame_buttons.h" 19 #include "ui/views/window/frame_buttons.h"
20 20
21 typedef struct _GtkStyle GtkStyle; 21 typedef struct _GtkStyle GtkStyle;
22 typedef struct _GtkWidget GtkWidget; 22 typedef struct _GtkWidget GtkWidget;
23 23
24 namespace libgtkui { 24 namespace libgtkui {
25 class Gtk2KeyBindingsHandler; 25 class Gtk2KeyBindingsHandler;
26 class GConfListener; 26 class GConfListener;
27 27
28 // Interface to GTK2 desktop features. 28 // Interface to GTK2 desktop features.
29 // 29 //
30 class Gtk2UI : public views::LinuxUI { 30 class GtkUi : public views::LinuxUI {
31 public: 31 public:
32 Gtk2UI(); 32 GtkUi();
33 ~Gtk2UI() override; 33 ~GtkUi() override;
34 34
35 typedef base::Callback<ui::NativeTheme*(aura::Window* window)> 35 typedef base::Callback<ui::NativeTheme*(aura::Window* window)>
36 NativeThemeGetter; 36 NativeThemeGetter;
37 37
38 // Setters used by GConfListener: 38 // Setters used by GConfListener:
39 void SetWindowButtonOrdering( 39 void SetWindowButtonOrdering(
40 const std::vector<views::FrameButton>& leading_buttons, 40 const std::vector<views::FrameButton>& leading_buttons,
41 const std::vector<views::FrameButton>& trailing_buttons); 41 const std::vector<views::FrameButton>& trailing_buttons);
42 void SetNonClientMiddleClickAction(NonClientMiddleClickAction action); 42 void SetNonClientMiddleClickAction(NonClientMiddleClickAction action);
43 43
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 std::unique_ptr<Gtk2KeyBindingsHandler> key_bindings_handler_; 197 std::unique_ptr<Gtk2KeyBindingsHandler> key_bindings_handler_;
198 198
199 // Objects to notify when the window frame button order changes. 199 // Objects to notify when the window frame button order changes.
200 base::ObserverList<views::WindowButtonOrderObserver> observer_list_; 200 base::ObserverList<views::WindowButtonOrderObserver> observer_list_;
201 201
202 // Whether we should lower the window on a middle click to the non client 202 // Whether we should lower the window on a middle click to the non client
203 // area. 203 // area.
204 NonClientMiddleClickAction middle_click_action_; 204 NonClientMiddleClickAction middle_click_action_;
205 205
206 // Used to override the native theme for a window. If no override is provided 206 // Used to override the native theme for a window. If no override is provided
207 // or the callback returns NULL, Gtk2UI will default to a NativeThemeGtk2 207 // or the callback returns NULL, GtkUi will default to a NativeThemeGtk2
208 // instance. 208 // instance.
209 NativeThemeGetter native_theme_overrider_; 209 NativeThemeGetter native_theme_overrider_;
210 210
211 float device_scale_factor_ = 1.0f; 211 float device_scale_factor_ = 1.0f;
212 212
213 DISALLOW_COPY_AND_ASSIGN(Gtk2UI); 213 DISALLOW_COPY_AND_ASSIGN(GtkUi);
214 }; 214 };
215 215
216 } // namespace libgtkui 216 } // namespace libgtkui
217 217
218 // Access point to the GTK2 desktop system. This should be the only symbol that 218 // Access point to the GTK2 desktop system. This should be the only symbol that
219 // is exported in the library; everything else should be used through the 219 // is exported in the library; everything else should be used through the
220 // interface, because eventually this .so will be loaded through dlopen at 220 // interface, because eventually this .so will be loaded through dlopen at
221 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or 221 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or
222 // QT or whatever. 222 // QT or whatever.
223 LIBGTKUI_EXPORT views::LinuxUI* BuildGtk2UI(); 223 LIBGTKUI_EXPORT views::LinuxUI* BuildGtkUi();
224 224
225 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UI_H_ 225 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/gconf_listener.cc ('k') | chrome/browser/ui/libgtkui/gtk_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698