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

Side by Side Diff: ui/gfx/gtk_util.cc

Issue 8495043: Turn on -Wexit-time-destructors for ui and content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "ui/gfx/gtk_util.h" 5 #include "ui/gfx/gtk_util.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 for (size_t i = 0; i < cutouts.size(); ++i) { 130 for (size_t i = 0; i < cutouts.size(); ++i) {
131 GdkRectangle rect = cutouts[i].ToGdkRectangle(); 131 GdkRectangle rect = cutouts[i].ToGdkRectangle();
132 GdkRegion* rect_region = gdk_region_rectangle(&rect); 132 GdkRegion* rect_region = gdk_region_rectangle(&rect);
133 gdk_region_subtract(region, rect_region); 133 gdk_region_subtract(region, rect_region);
134 // TODO(deanm): It would be nice to be able to reuse the GdkRegion here. 134 // TODO(deanm): It would be nice to be able to reuse the GdkRegion here.
135 gdk_region_destroy(rect_region); 135 gdk_region_destroy(rect_region);
136 } 136 }
137 } 137 }
138 138
139 GdkCursor* GetCursor(int type) { 139 GdkCursor* GetCursor(int type) {
140 static GdkCursorCache impl; 140 CR_DEFINE_STATIC_LOCAL(GdkCursorCache, impl, ());
141 return impl.GetCursorImpl(static_cast<GdkCursorType>(type)); 141 return impl.GetCursorImpl(static_cast<GdkCursorType>(type));
142 } 142 }
143 143
144 #if !defined(USE_WAYLAND) && !defined(USE_AURA) 144 #if !defined(USE_WAYLAND) && !defined(USE_AURA)
145 PangoContext* GetPangoContext() { 145 PangoContext* GetPangoContext() {
146 return gdk_pango_context_get(); 146 return gdk_pango_context_get();
147 } 147 }
148 #endif 148 #endif
149 149
150 void InitRCStyles() { 150 void InitRCStyles() {
(...skipping 19 matching lines...) Expand all
170 " GtkDialog::button-spacing = 6\n" 170 " GtkDialog::button-spacing = 6\n"
171 " GtkDialog::content-area-spacing = 18\n" 171 " GtkDialog::content-area-spacing = 18\n"
172 " GtkDialog::content-area-border = 0\n" 172 " GtkDialog::content-area-border = 0\n"
173 "}\n" 173 "}\n"
174 "widget \"about-dialog\" style : application \"about-dialog\"\n"; 174 "widget \"about-dialog\" style : application \"about-dialog\"\n";
175 175
176 gtk_rc_parse_string(kRCText); 176 gtk_rc_parse_string(kRCText);
177 } 177 }
178 178
179 } // namespace gfx 179 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698