OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/common/gtk_util.h" | 5 #include "chrome/common/gtk_util.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/linux_util.h" | 9 #include "base/linux_util.h" |
10 #include "skia/include/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // Callback used in RemoveAllChildren. | 14 // Callback used in RemoveAllChildren. |
15 void RemoveWidget(GtkWidget* widget, gpointer container) { | 15 void RemoveWidget(GtkWidget* widget, gpointer container) { |
16 gtk_container_remove(GTK_CONTAINER(container), widget); | 16 gtk_container_remove(GTK_CONTAINER(container), widget); |
17 } | 17 } |
18 | 18 |
19 void FreePixels(guchar* pixels, gpointer data) { | 19 void FreePixels(guchar* pixels, gpointer data) { |
20 free(data); | 20 free(data); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 gtk_container_add(GTK_CONTAINER(alignment), child); | 72 gtk_container_add(GTK_CONTAINER(alignment), child); |
73 gtk_container_add(GTK_CONTAINER(ebox), alignment); | 73 gtk_container_add(GTK_CONTAINER(ebox), alignment); |
74 return ebox; | 74 return ebox; |
75 } | 75 } |
76 | 76 |
77 void RemoveAllChildren(GtkWidget* container) { | 77 void RemoveAllChildren(GtkWidget* container) { |
78 gtk_container_foreach(GTK_CONTAINER(container), RemoveWidget, container); | 78 gtk_container_foreach(GTK_CONTAINER(container), RemoveWidget, container); |
79 } | 79 } |
80 | 80 |
81 } // namespace gfx | 81 } // namespace gfx |
OLD | NEW |