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

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

Issue 2627153003: Gtk3: Fix separator color on Gtk3.20 (Closed)
Patch Set: Add GtkVersionCheck 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 | « no previous file | chrome/browser/ui/libgtkui/gtk_util.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_
6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_ 6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // it above |parent|. Do nothing if |parent| is NULL. 61 // it above |parent|. Do nothing if |parent| is NULL.
62 void SetGtkTransientForAura(GtkWidget* dialog, aura::Window* parent); 62 void SetGtkTransientForAura(GtkWidget* dialog, aura::Window* parent);
63 63
64 // Gets the transient parent aura window for |dialog|. 64 // Gets the transient parent aura window for |dialog|.
65 aura::Window* GetAuraTransientParent(GtkWidget* dialog); 65 aura::Window* GetAuraTransientParent(GtkWidget* dialog);
66 66
67 // Clears the transient parent for |dialog|. 67 // Clears the transient parent for |dialog|.
68 void ClearAuraTransientParent(GtkWidget* dialog); 68 void ClearAuraTransientParent(GtkWidget* dialog);
69 69
70 #if GTK_MAJOR_VERSION > 2 70 #if GTK_MAJOR_VERSION > 2
71 // Returns true iff the runtime version of Gtk used meets
72 // |major|.|minor|.|micro|.
73 bool GtkVersionCheck(int major, int minor = 0, int micro = 0);
74
71 template <typename T> 75 template <typename T>
72 class ScopedGObject { 76 class ScopedGObject {
73 public: 77 public:
74 explicit ScopedGObject(T* obj) : obj_(obj) { 78 explicit ScopedGObject(T* obj) : obj_(obj) {
75 // Increase the reference count of |obj_|, removing the floating 79 // Increase the reference count of |obj_|, removing the floating
76 // reference if it has one. 80 // reference if it has one.
77 g_object_ref_sink(obj_); 81 g_object_ref_sink(obj_);
78 } 82 }
79 83
80 ScopedGObject(const ScopedGObject<T>& other) : obj_(other.obj_) { 84 ScopedGObject(const ScopedGObject<T>& other) : obj_(other.obj_) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 135
132 // If there is a border, renders the border from the style context 136 // If there is a border, renders the border from the style context
133 // created by GetStyleContextFromCss(|css_selector|) into a single 137 // created by GetStyleContextFromCss(|css_selector|) into a single
134 // pixel and returns the color. Otherwise returns kInvalidColor. 138 // pixel and returns the color. Otherwise returns kInvalidColor.
135 SkColor GetBorderColor(const char* css_selector); 139 SkColor GetBorderColor(const char* css_selector);
136 #endif 140 #endif
137 141
138 } // namespace libgtkui 142 } // namespace libgtkui
139 143
140 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_ 144 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/libgtkui/gtk_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698