| 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 "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/rand_util.h" | |
| 8 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 9 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
| 10 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
| 11 #include "chrome/browser/extensions/extension_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
| 12 #include "chrome/common/extensions/extension.h" | 11 #include "chrome/common/extensions/extension.h" |
| 13 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
| 14 #include "views/controls/button/checkbox.h" | 13 #include "views/controls/button/checkbox.h" |
| 15 #include "views/controls/image_view.h" | 14 #include "views/controls/image_view.h" |
| 16 #include "views/controls/label.h" | 15 #include "views/controls/label.h" |
| 17 #include "views/controls/link.h" | 16 #include "views/controls/link.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 height += heading_->GetHeightForWidth(right_column_width_); | 131 height += heading_->GetHeightForWidth(right_column_width_); |
| 133 height += kPanelVertMargin; | 132 height += kPanelVertMargin; |
| 134 | 133 |
| 135 if (warning_) | 134 if (warning_) |
| 136 height += warning_->GetHeightForWidth(right_column_width_); | 135 height += warning_->GetHeightForWidth(right_column_width_); |
| 137 else | 136 else |
| 138 height += create_shortcut_->GetPreferredSize().height(); | 137 height += create_shortcut_->GetPreferredSize().height(); |
| 139 | 138 |
| 140 height += kPanelVertMargin; | 139 height += kPanelVertMargin; |
| 141 | 140 |
| 142 return gfx::Size(width, std::max(height, icon_size_ + kPanelVertMargin * 2))
; | 141 return gfx::Size(width, |
| 142 std::max(height, icon_size_ + kPanelVertMargin * 2)); |
| 143 } | 143 } |
| 144 | 144 |
| 145 virtual void Layout() { | 145 virtual void Layout() { |
| 146 int x = kPanelHorizMargin; | 146 int x = kPanelHorizMargin; |
| 147 int y = kPanelVertMargin; | 147 int y = kPanelVertMargin; |
| 148 | 148 |
| 149 icon_->SetBounds(x, y, icon_size_, icon_size_); | 149 icon_->SetBounds(x, y, icon_size_, icon_size_); |
| 150 x += icon_size_; | 150 x += icon_size_; |
| 151 x += kPanelHorizMargin; | 151 x += kPanelHorizMargin; |
| 152 | 152 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 if (!window) { | 207 if (!window) { |
| 208 delegate->InstallUIAbort(); | 208 delegate->InstallUIAbort(); |
| 209 return; | 209 return; |
| 210 } | 210 } |
| 211 | 211 |
| 212 views::Window::CreateChromeWindow(window->GetNativeHandle(), gfx::Rect(), | 212 views::Window::CreateChromeWindow(window->GetNativeHandle(), gfx::Rect(), |
| 213 new InstallDialogContent(delegate, extension, icon, | 213 new InstallDialogContent(delegate, extension, icon, |
| 214 UTF16ToWideHack(warning_text), | 214 UTF16ToWideHack(warning_text), |
| 215 type))->Show(); | 215 type))->Show(); |
| 216 } | 216 } |
| OLD | NEW |