| OLD | NEW |
| 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 views::GridLayout::USE_PREF, // Size type. | 211 views::GridLayout::USE_PREF, // Size type. |
| 212 0, // Ignored for USE_PREF. | 212 0, // Ignored for USE_PREF. |
| 213 0); // Minimum size. | 213 0); // Minimum size. |
| 214 columns->AddPaddingColumn(0, kHorizontalPadding); | 214 columns->AddPaddingColumn(0, kHorizontalPadding); |
| 215 | 215 |
| 216 layout->AddPaddingRow(0, kVerticalPadding); | 216 layout->AddPaddingRow(0, kVerticalPadding); |
| 217 for (int i = 0; i < model_.GetSectionCount(); ++i) { | 217 for (int i = 0; i < model_.GetSectionCount(); ++i) { |
| 218 PageInfoModel::SectionInfo info = model_.GetSectionInfo(i); | 218 PageInfoModel::SectionInfo info = model_.GetSectionInfo(i); |
| 219 layout->StartRow(0, 0); | 219 layout->StartRow(0, 0); |
| 220 layout->AddView(new Section( | 220 layout->AddView(new Section( |
| 221 info.title, info.state != PageInfoModel::SECTION_STATE_ERROR, | 221 info.title, info.state == PageInfoModel::SECTION_STATE_OK, |
| 222 info.headline, info.description)); | 222 info.headline, info.description)); |
| 223 layout->AddPaddingRow(0, kVerticalPadding); | 223 layout->AddPaddingRow(0, kVerticalPadding); |
| 224 } | 224 } |
| 225 layout->AddPaddingRow(1, kVerticalPadding); | 225 layout->AddPaddingRow(1, kVerticalPadding); |
| 226 | 226 |
| 227 Layout(); | 227 Layout(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void PageInfoWindowView::Show() { | 230 void PageInfoWindowView::Show() { |
| 231 window()->Show(); | 231 window()->Show(); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 Profile* profile, | 447 Profile* profile, |
| 448 const GURL& url, | 448 const GURL& url, |
| 449 const NavigationEntry::SSLStatus& ssl, | 449 const NavigationEntry::SSLStatus& ssl, |
| 450 bool show_history) { | 450 bool show_history) { |
| 451 PageInfoWindowView* page_info_window = | 451 PageInfoWindowView* page_info_window = |
| 452 new PageInfoWindowView(parent, profile, url, ssl, show_history); | 452 new PageInfoWindowView(parent, profile, url, ssl, show_history); |
| 453 page_info_window->Show(); | 453 page_info_window->Show(); |
| 454 } | 454 } |
| 455 | 455 |
| 456 } | 456 } |
| OLD | NEW |