OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 GtkWidget* section_box = gtk_hbox_new(FALSE, 0); | 216 GtkWidget* section_box = gtk_hbox_new(FALSE, 0); |
217 | 217 |
218 if (section.type == PageInfoModel::SECTION_INFO_IDENTITY || | 218 if (section.type == PageInfoModel::SECTION_INFO_IDENTITY || |
219 section.type == PageInfoModel::SECTION_INFO_CONNECTION) { | 219 section.type == PageInfoModel::SECTION_INFO_CONNECTION) { |
220 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 220 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
221 GdkPixbuf* pixbuf = NULL; | 221 GdkPixbuf* pixbuf = NULL; |
222 switch (section.state) { | 222 switch (section.state) { |
223 case PageInfoModel::SECTION_STATE_OK: | 223 case PageInfoModel::SECTION_STATE_OK: |
224 pixbuf = rb.GetPixbufNamed(IDR_PAGEINFO_GOOD); | 224 pixbuf = rb.GetPixbufNamed(IDR_PAGEINFO_GOOD); |
225 break; | 225 break; |
226 case PageInfoModel::SECTION_STATE_WARNING: | 226 case PageInfoModel::SECTION_STATE_WARNING_MINOR: |
227 DCHECK(section.type == PageInfoModel::SECTION_INFO_CONNECTION); | 227 DCHECK(section.type == PageInfoModel::SECTION_INFO_CONNECTION); |
228 pixbuf = rb.GetPixbufNamed(IDR_PAGEINFO_MIXED); | 228 pixbuf = rb.GetPixbufNamed(IDR_PAGEINFO_WARNING_MINOR); |
| 229 break; |
| 230 case PageInfoModel::SECTION_STATE_WARNING_MAJOR: |
| 231 pixbuf = rb.GetPixbufNamed(IDR_PAGEINFO_WARNING_MAJOR); |
229 break; | 232 break; |
230 case PageInfoModel::SECTION_STATE_ERROR: | 233 case PageInfoModel::SECTION_STATE_ERROR: |
231 pixbuf = rb.GetPixbufNamed(IDR_PAGEINFO_BAD); | 234 pixbuf = rb.GetPixbufNamed(IDR_PAGEINFO_BAD); |
232 break; | 235 break; |
233 default: | 236 default: |
234 NOTREACHED(); | 237 NOTREACHED(); |
235 } | 238 } |
236 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf); | 239 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf); |
237 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, | 240 gtk_box_pack_start(GTK_BOX(section_box), image, FALSE, FALSE, |
238 gtk_util::kControlSpacing); | 241 gtk_util::kControlSpacing); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 305 |
303 void ShowPageInfoBubble(gfx::NativeWindow parent, | 306 void ShowPageInfoBubble(gfx::NativeWindow parent, |
304 Profile* profile, | 307 Profile* profile, |
305 const GURL& url, | 308 const GURL& url, |
306 const NavigationEntry::SSLStatus& ssl, | 309 const NavigationEntry::SSLStatus& ssl, |
307 bool show_history) { | 310 bool show_history) { |
308 new PageInfoBubbleGtk(parent, profile, url, ssl, show_history); | 311 new PageInfoBubbleGtk(parent, profile, url, ssl, show_history); |
309 } | 312 } |
310 | 313 |
311 } // namespace browser | 314 } // namespace browser |
OLD | NEW |