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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_util.cc

Issue 377423003: Lots of random cleanups, mostly for native_theme_win.cc: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak switches Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/native_theme/native_theme.h » ('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 #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
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
OLDNEW
« no previous file with comments | « no previous file | ui/native_theme/native_theme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698