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

Side by Side Diff: chrome/browser/chromeos/native_dialog_window.cc

Issue 7227027: GTK: More 2.18 goodness. Move from macros to real accessor functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove views/ Created 9 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
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 "chrome/browser/chromeos/native_dialog_window.h" 5 #include "chrome/browser/chromeos/native_dialog_window.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 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 15 matching lines...) Expand all
26 // Gets the default widget of given dialog. 26 // Gets the default widget of given dialog.
27 GtkWidget* GetDialogDefaultWidget(GtkDialog* dialog) { 27 GtkWidget* GetDialogDefaultWidget(GtkDialog* dialog) {
28 GtkWidget* default_widget = NULL; 28 GtkWidget* default_widget = NULL;
29 29
30 GList* children = gtk_container_get_children( 30 GList* children = gtk_container_get_children(
31 GTK_CONTAINER(dialog->action_area)); 31 GTK_CONTAINER(dialog->action_area));
32 32
33 GList* current = children; 33 GList* current = children;
34 while (current) { 34 while (current) {
35 GtkWidget* widget = reinterpret_cast<GtkWidget*>(current->data); 35 GtkWidget* widget = reinterpret_cast<GtkWidget*>(current->data);
36 if (GTK_WIDGET_HAS_DEFAULT(widget)) { 36 if (gtk_widget_has_default(widget)) {
37 default_widget = widget; 37 default_widget = widget;
38 break; 38 break;
39 } 39 }
40 40
41 current = g_list_next(current); 41 current = g_list_next(current);
42 } 42 }
43 43
44 g_list_free(children); 44 g_list_free(children);
45 45
46 return default_widget; 46 return default_widget;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return host ? host->GetWidget()->GetNativeWindow() : NULL; 281 return host ? host->GetWidget()->GetNativeWindow() : NULL;
282 } 282 }
283 283
284 gfx::Rect GetNativeDialogContentsBounds(gfx::NativeView native_dialog) { 284 gfx::Rect GetNativeDialogContentsBounds(gfx::NativeView native_dialog) {
285 NativeDialogHost* host = reinterpret_cast<NativeDialogHost*>( 285 NativeDialogHost* host = reinterpret_cast<NativeDialogHost*>(
286 g_object_get_data(G_OBJECT(native_dialog), kNativeDialogHost)); 286 g_object_get_data(G_OBJECT(native_dialog), kNativeDialogHost));
287 return host ? host->bounds() : gfx::Rect(); 287 return host ? host->bounds() : gfx::Rect();
288 } 288 }
289 289
290 } // namespace chromeos 290 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screen_locker.cc ('k') | chrome/browser/platform_util_common_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698