| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_install_dialog.h" | 9 #include "chrome/browser/extensions/extension_install_dialog.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/browser_list.h" | 11 #include "chrome/browser/ui/browser_list.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/dialog_style.h" | 13 #include "chrome/browser/ui/dialog_style.h" |
| 14 #include "chrome/browser/ui/views/window.h" | 14 #include "chrome/browser/ui/views/window.h" |
| 15 #include "chrome/common/extensions/extension.h" | 15 #include "chrome/common/extensions/extension.h" |
| 16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
| 19 #include "ui/views/border.h" |
| 19 #include "ui/views/controls/image_view.h" | 20 #include "ui/views/controls/image_view.h" |
| 20 #include "ui/views/controls/label.h" | 21 #include "ui/views/controls/label.h" |
| 21 #include "ui/views/controls/link.h" | 22 #include "ui/views/controls/link.h" |
| 22 #include "ui/views/controls/link_listener.h" | 23 #include "ui/views/controls/link_listener.h" |
| 23 #include "ui/views/controls/separator.h" | 24 #include "ui/views/controls/separator.h" |
| 24 #include "ui/views/layout/box_layout.h" | 25 #include "ui/views/layout/box_layout.h" |
| 25 #include "ui/views/layout/grid_layout.h" | 26 #include "ui/views/layout/grid_layout.h" |
| 26 #include "ui/views/layout/layout_constants.h" | 27 #include "ui/views/layout/layout_constants.h" |
| 27 #include "ui/views/view.h" | 28 #include "ui/views/view.h" |
| 28 #include "ui/views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
| 29 #include "ui/views/window/dialog_delegate.h" | 30 #include "ui/views/window/dialog_delegate.h" |
| 30 #include "views/border.h" | |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // Size of extension icon in top left of dialog. | 34 // Size of extension icon in top left of dialog. |
| 35 const int kIconSize = 69; | 35 const int kIconSize = 69; |
| 36 | 36 |
| 37 // Width of the left column of the dialog when the extension requests | 37 // Width of the left column of the dialog when the extension requests |
| 38 // permissions. | 38 // permissions. |
| 39 const int kPermissionsLeftColumnWidth = 250; | 39 const int kPermissionsLeftColumnWidth = 250; |
| 40 | 40 |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 | 329 |
| 330 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( | 330 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( |
| 331 delegate, extension, icon, prompt); | 331 delegate, extension, icon, prompt); |
| 332 | 332 |
| 333 views::Widget* window = browser::CreateViewsWindow( | 333 views::Widget* window = browser::CreateViewsWindow( |
| 334 browser_window->GetNativeHandle(), dialog, STYLE_GENERIC); | 334 browser_window->GetNativeHandle(), dialog, STYLE_GENERIC); |
| 335 | 335 |
| 336 window->Show(); | 336 window->Show(); |
| 337 } | 337 } |
| OLD | NEW |