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 "chrome/browser/ui/browser_dialogs.h" | 5 #include "chrome/browser/ui/browser_dialogs.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // |||icon||| ||| | 92 // |||icon||| ||| |
93 // ||·----·|| The folowing page(s).. ||| | 93 // ||·----·|| The folowing page(s).. ||| |
94 // || || ||| | 94 // || || ||| |
95 // || ||------------------------||| | 95 // || ||------------------------||| |
96 // || || table of tabs ||| | 96 // || || table of tabs ||| |
97 // || |·------------------------·|| | 97 // || |·------------------------·|| |
98 // |·---------------------------------·| | 98 // |·---------------------------------·| |
99 // | | | 99 // | | |
100 // | kill button wait button| | 100 // | kill button wait button| |
101 // ·-----------------------------------· | 101 // ·-----------------------------------· |
102 GtkWidget* contents_vbox = dialog_->vbox; | 102 GtkWidget* content_area = gtk_dialog_get_content_area(dialog_); |
103 gtk_box_set_spacing(GTK_BOX(contents_vbox), gtk_util::kContentAreaSpacing); | 103 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); |
104 | 104 |
105 GtkWidget* hbox = gtk_hbox_new(FALSE, 12); | 105 GtkWidget* hbox = gtk_hbox_new(FALSE, 12); |
106 gtk_box_pack_start(GTK_BOX(contents_vbox), hbox, TRUE, TRUE, 0); | 106 gtk_box_pack_start(GTK_BOX(content_area), hbox, TRUE, TRUE, 0); |
107 | 107 |
108 // Wrap the icon in a vbox so it stays top aligned. | 108 // Wrap the icon in a vbox so it stays top aligned. |
109 GtkWidget* icon_vbox = gtk_vbox_new(FALSE, 0); | 109 GtkWidget* icon_vbox = gtk_vbox_new(FALSE, 0); |
110 gtk_box_pack_start(GTK_BOX(hbox), icon_vbox, FALSE, FALSE, 0); | 110 gtk_box_pack_start(GTK_BOX(hbox), icon_vbox, FALSE, FALSE, 0); |
111 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 111 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
112 GdkPixbuf* icon_pixbuf = rb.GetNativeImageNamed(IDR_FROZEN_TAB_ICON); | 112 GdkPixbuf* icon_pixbuf = rb.GetNativeImageNamed(IDR_FROZEN_TAB_ICON); |
113 GtkWidget* icon = gtk_image_new_from_pixbuf(icon_pixbuf); | 113 GtkWidget* icon = gtk_image_new_from_pixbuf(icon_pixbuf); |
114 gtk_box_pack_start(GTK_BOX(icon_vbox), icon, FALSE, FALSE, 0); | 114 gtk_box_pack_start(GTK_BOX(icon_vbox), icon, FALSE, FALSE, 0); |
115 | 115 |
116 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); | 116 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 g_instance->ShowForTabContents(contents); | 224 g_instance->ShowForTabContents(contents); |
225 } | 225 } |
226 } | 226 } |
227 | 227 |
228 void HideHungRendererDialog(TabContents* contents) { | 228 void HideHungRendererDialog(TabContents* contents) { |
229 if (!logging::DialogsAreSuppressed() && g_instance) | 229 if (!logging::DialogsAreSuppressed() && g_instance) |
230 g_instance->EndForTabContents(contents); | 230 g_instance->EndForTabContents(contents); |
231 } | 231 } |
232 | 232 |
233 } // namespace browser | 233 } // namespace browser |
OLD | NEW |