| OLD | NEW |
| 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/views/hung_renderer_view.h" | 5 #include "chrome/browser/ui/views/hung_renderer_view.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 layout->AddView(frozen_icon_view, 1, 3); | 440 layout->AddView(frozen_icon_view, 1, 3); |
| 441 // Add the label with a preferred width of 1, this way it doesn't affect the | 441 // Add the label with a preferred width of 1, this way it doesn't affect the |
| 442 // overall preferred size of the dialog. | 442 // overall preferred size of the dialog. |
| 443 layout->AddView( | 443 layout->AddView( |
| 444 info_label_, 1, 1, GridLayout::FILL, GridLayout::LEADING, 1, 0); | 444 info_label_, 1, 1, GridLayout::FILL, GridLayout::LEADING, 1, 0); |
| 445 | 445 |
| 446 layout->AddPaddingRow( | 446 layout->AddPaddingRow( |
| 447 0, delegate->GetMetric( | 447 0, delegate->GetMetric( |
| 448 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING)); | 448 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING)); |
| 449 | 449 |
| 450 layout->StartRow(0, double_column_set_id); | 450 layout->StartRow(1, double_column_set_id); |
| 451 layout->SkipColumns(1); | 451 layout->SkipColumns(1); |
| 452 layout->AddView(hung_pages_table_->CreateParentIfNecessary(), 1, 1, | 452 layout->AddView(hung_pages_table_->CreateParentIfNecessary(), 1, 1, |
| 453 views::GridLayout::FILL, | 453 views::GridLayout::FILL, |
| 454 views::GridLayout::FILL, kTableViewWidth, kTableViewHeight); | 454 views::GridLayout::FILL, kTableViewWidth, kTableViewHeight); |
| 455 | 455 |
| 456 initialized_ = true; | 456 initialized_ = true; |
| 457 } | 457 } |
| 458 | 458 |
| 459 // static | 459 // static |
| 460 void HungRendererDialogView::InitClass() { | 460 void HungRendererDialogView::InitClass() { |
| 461 static bool initialized = false; | 461 static bool initialized = false; |
| 462 if (!initialized) { | 462 if (!initialized) { |
| 463 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 463 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 464 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); | 464 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); |
| 465 initialized = true; | 465 initialized = true; |
| 466 } | 466 } |
| 467 } | 467 } |
| OLD | NEW |