| 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/extensions/extension_install_dialog_view.h" | 5 #include "chrome/browser/ui/views/extensions/extension_install_dialog_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } | 411 } |
| 412 | 412 |
| 413 views::GridLayout* ExtensionInstallDialogView::CreateLayout( | 413 views::GridLayout* ExtensionInstallDialogView::CreateLayout( |
| 414 int left_column_width, | 414 int left_column_width, |
| 415 int column_set_id) { | 415 int column_set_id) { |
| 416 container_ = new views::View(); | 416 container_ = new views::View(); |
| 417 // This is basically views::GridLayout::CreatePanel, but without a top or | 417 // This is basically views::GridLayout::CreatePanel, but without a top or |
| 418 // right margin (we effectively get a top margin anyway from the empty dialog | 418 // right margin (we effectively get a top margin anyway from the empty dialog |
| 419 // title, and we add an explicit padding column as a right margin below). | 419 // title, and we add an explicit padding column as a right margin below). |
| 420 views::GridLayout* layout = new views::GridLayout(container_); | 420 views::GridLayout* layout = new views::GridLayout(container_); |
| 421 layout->SetInsets(0, views::kButtonHEdgeMarginNew, views::kPanelVertMargin, | 421 layout->SetInsets(0, views::kButtonHEdgeMarginNew, |
| 422 LayoutDelegate::Get()->GetMetric( |
| 423 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN), |
| 422 0); | 424 0); |
| 423 container_->SetLayoutManager(layout); | 425 container_->SetLayoutManager(layout); |
| 424 AddChildView(container_); | 426 AddChildView(container_); |
| 425 | 427 |
| 426 views::ColumnSet* column_set = layout->AddColumnSet(column_set_id); | 428 views::ColumnSet* column_set = layout->AddColumnSet(column_set_id); |
| 427 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, | 429 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, |
| 428 0, // no resizing | 430 0, // no resizing |
| 429 views::GridLayout::USE_PREF, | 431 views::GridLayout::USE_PREF, |
| 430 0, // no fixed width | 432 0, // no fixed width |
| 431 left_column_width); | 433 left_column_width); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 gfx::ImageSkia icon = gfx::CreateVectorIcon( | 740 gfx::ImageSkia icon = gfx::CreateVectorIcon( |
| 739 expanded ? kCaretUpIcon : kCaretDownIcon, gfx::kChromeIconGrey); | 741 expanded ? kCaretUpIcon : kCaretDownIcon, gfx::kChromeIconGrey); |
| 740 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); | 742 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); |
| 741 } | 743 } |
| 742 | 744 |
| 743 // static | 745 // static |
| 744 ExtensionInstallPrompt::ShowDialogCallback | 746 ExtensionInstallPrompt::ShowDialogCallback |
| 745 ExtensionInstallPrompt::GetViewsShowDialogCallback() { | 747 ExtensionInstallPrompt::GetViewsShowDialogCallback() { |
| 746 return base::Bind(&ShowExtensionInstallDialogImpl); | 748 return base::Bind(&ShowExtensionInstallDialogImpl); |
| 747 } | 749 } |
| OLD | NEW |