OLD | NEW |
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/base/gtk/owned_widget_gtk.h" | 5 #include "ui/base/gtk/owned_widget_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
| 11 #error "The GTK+ port will be deleted later this week. If you are seeing this, y
ou are trying to compile it. Please check your gyp flags for 'use_aura=0' and re
move them." |
| 12 |
11 namespace ui { | 13 namespace ui { |
12 | 14 |
13 OwnedWidgetGtk::~OwnedWidgetGtk() { | 15 OwnedWidgetGtk::~OwnedWidgetGtk() { |
14 Destroy(); | 16 Destroy(); |
15 } | 17 } |
16 | 18 |
17 void OwnedWidgetGtk::Own(GtkWidget* widget) { | 19 void OwnedWidgetGtk::Own(GtkWidget* widget) { |
18 if (!widget) | 20 if (!widget) |
19 return; | 21 return; |
20 | 22 |
(...skipping 15 matching lines...) Expand all Loading... |
36 widget_ = NULL; | 38 widget_ = NULL; |
37 gtk_widget_destroy(widget); | 39 gtk_widget_destroy(widget); |
38 | 40 |
39 DCHECK(!g_object_is_floating(widget)); | 41 DCHECK(!g_object_is_floating(widget)); |
40 // NOTE: Assumes some implementation details about glib internals. | 42 // NOTE: Assumes some implementation details about glib internals. |
41 DCHECK_EQ(G_OBJECT(widget)->ref_count, 1U); | 43 DCHECK_EQ(G_OBJECT(widget)->ref_count, 1U); |
42 g_object_unref(widget); | 44 g_object_unref(widget); |
43 } | 45 } |
44 | 46 |
45 } // namespace ui | 47 } // namespace ui |
OLD | NEW |