| OLD | NEW |
| 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 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" | 5 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 return reinterpret_cast<aura::Window*>( | 125 return reinterpret_cast<aura::Window*>( |
| 126 g_object_get_data(G_OBJECT(dialog), kAuraTransientParent)); | 126 g_object_get_data(G_OBJECT(dialog), kAuraTransientParent)); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void ClearAuraTransientParent(GtkWidget* dialog) { | 129 void ClearAuraTransientParent(GtkWidget* dialog) { |
| 130 g_object_set_data(G_OBJECT(dialog), kAuraTransientParent, NULL); | 130 g_object_set_data(G_OBJECT(dialog), kAuraTransientParent, NULL); |
| 131 } | 131 } |
| 132 | 132 |
| 133 GtkStateType GetGtkState(ui::NativeTheme::State state) { | 133 GtkStateType GetGtkState(ui::NativeTheme::State state) { |
| 134 switch (state) { | 134 switch (state) { |
| 135 case ui::NativeTheme::kDisabled: return GTK_STATE_INSENSITIVE; | 135 case ui::NativeTheme::kDisabled: return GTK_STATE_INSENSITIVE; |
| 136 case ui::NativeTheme::kHovered: return GTK_STATE_PRELIGHT; | 136 case ui::NativeTheme::kHovered: return GTK_STATE_PRELIGHT; |
| 137 case ui::NativeTheme::kNormal: return GTK_STATE_NORMAL; | 137 case ui::NativeTheme::kNormal: return GTK_STATE_NORMAL; |
| 138 case ui::NativeTheme::kPressed: return GTK_STATE_ACTIVE; | 138 case ui::NativeTheme::kPressed: return GTK_STATE_ACTIVE; |
| 139 case ui::NativeTheme::kMaxState: NOTREACHED() << "Unknown state: " << state; | 139 case ui::NativeTheme::kNumStates: NOTREACHED(); |
| 140 } | 140 } |
| 141 return GTK_STATE_NORMAL; | 141 return GTK_STATE_NORMAL; |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace libgtk2ui | 144 } // namespace libgtk2ui |
| OLD | NEW |