| 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" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "chrome/browser/platform_util.h" | 12 #include "chrome/browser/platform_util.h" |
| 13 #include "chrome/browser/ui/browser_finder.h" | 13 #include "chrome/browser/ui/browser_finder.h" |
| 14 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" | 14 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" |
| 15 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 15 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| 16 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" |
| 17 #include "chrome/browser/ui/views/harmony/layout_delegate.h" | 17 #include "chrome/browser/ui/views/harmony/layout_delegate.h" |
| 18 #include "chrome/browser/ui/views/layout_utils.h" | |
| 19 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
| 20 #include "chrome/common/crash_keys.h" | 19 #include "chrome/common/crash_keys.h" |
| 21 #include "chrome/common/logging_chrome.h" | 20 #include "chrome/common/logging_chrome.h" |
| 22 #include "chrome/grit/generated_resources.h" | 21 #include "chrome/grit/generated_resources.h" |
| 23 #include "chrome/grit/theme_resources.h" | 22 #include "chrome/grit/theme_resources.h" |
| 24 #include "components/constrained_window/constrained_window_views.h" | 23 #include "components/constrained_window/constrained_window_views.h" |
| 25 #include "components/favicon/content/content_favicon_driver.h" | 24 #include "components/favicon/content/content_favicon_driver.h" |
| 26 #include "components/web_modal/web_contents_modal_dialog_host.h" | 25 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| 27 #include "content/public/browser/render_process_host.h" | 26 #include "content/public/browser/render_process_host.h" |
| 28 #include "content/public/browser/render_view_host.h" | 27 #include "content/public/browser/render_view_host.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 hung_pages_table_model_.reset(new HungPagesTableModel(this)); | 414 hung_pages_table_model_.reset(new HungPagesTableModel(this)); |
| 416 std::vector<ui::TableColumn> columns; | 415 std::vector<ui::TableColumn> columns; |
| 417 columns.push_back(ui::TableColumn()); | 416 columns.push_back(ui::TableColumn()); |
| 418 hung_pages_table_ = new views::TableView( | 417 hung_pages_table_ = new views::TableView( |
| 419 hung_pages_table_model_.get(), columns, views::ICON_AND_TEXT, true); | 418 hung_pages_table_model_.get(), columns, views::ICON_AND_TEXT, true); |
| 420 hung_pages_table_->SetGrouper(hung_pages_table_model_.get()); | 419 hung_pages_table_->SetGrouper(hung_pages_table_model_.get()); |
| 421 | 420 |
| 422 using views::GridLayout; | 421 using views::GridLayout; |
| 423 using views::ColumnSet; | 422 using views::ColumnSet; |
| 424 | 423 |
| 425 GridLayout* layout = layout_utils::CreatePanelLayout(this); | 424 GridLayout* layout = GridLayout::CreatePanel(this); |
| 426 LayoutDelegate* delegate = LayoutDelegate::Get(); | 425 LayoutDelegate* delegate = LayoutDelegate::Get(); |
| 427 | 426 |
| 428 const int double_column_set_id = 0; | 427 const int double_column_set_id = 0; |
| 429 ColumnSet* column_set = layout->AddColumnSet(double_column_set_id); | 428 ColumnSet* column_set = layout->AddColumnSet(double_column_set_id); |
| 430 column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0, | 429 column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0, |
| 431 GridLayout::FIXED, frozen_icon_->width(), 0); | 430 GridLayout::FIXED, frozen_icon_->width(), 0); |
| 432 column_set->AddPaddingColumn( | 431 column_set->AddPaddingColumn( |
| 433 0, | 432 0, |
| 434 delegate->GetMetric( | 433 delegate->GetMetric( |
| 435 LayoutDelegate::Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE)); | 434 LayoutDelegate::Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE)); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 458 | 457 |
| 459 // static | 458 // static |
| 460 void HungRendererDialogView::InitClass() { | 459 void HungRendererDialogView::InitClass() { |
| 461 static bool initialized = false; | 460 static bool initialized = false; |
| 462 if (!initialized) { | 461 if (!initialized) { |
| 463 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 462 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 464 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); | 463 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); |
| 465 initialized = true; | 464 initialized = true; |
| 466 } | 465 } |
| 467 } | 466 } |
| OLD | NEW |