| Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc
|
| diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc
|
| index cb2498f064fd0b0bb7c51e04ae8b3d8bc4df0205..d81bfdf8a6158fc626b54bf5a83a609edaacd4d6 100644
|
| --- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc
|
| +++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc
|
| @@ -4,72 +4,51 @@
|
|
|
| #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.h"
|
|
|
| -#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_manage_tab.h"
|
| #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_tab.h"
|
| #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_tab.h"
|
| -#include "chrome/browser/ui/views/constrained_window_views.h"
|
| #include "grit/generated_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| #include "ui/views/controls/tabbed_pane/tabbed_pane.h"
|
| -#include "ui/views/layout/fill_layout.h"
|
| -#include "ui/views/layout/layout_manager.h"
|
| +#include "ui/views/layout/box_layout.h"
|
| +#include "ui/views/layout/layout_constants.h"
|
| #include "ui/views/widget/widget.h"
|
| -#include "ui/views/window/dialog_delegate.h"
|
|
|
| void ShowAppInfoDialog(gfx::NativeWindow parent_window,
|
| - const gfx::Rect& dialog_widget_bounds,
|
| Profile* profile,
|
| const extensions::Extension* app,
|
| const base::Closure& close_callback) {
|
| - views::Widget* dialog = CreateBrowserModalDialogViews(
|
| + AppListDialogContentsView::CreateDialogWidget(
|
| new AppInfoDialog(parent_window, profile, app, close_callback),
|
| - parent_window);
|
| - dialog->SetBounds(dialog_widget_bounds);
|
| - dialog->Show();
|
| + parent_window)->Show();
|
| }
|
|
|
| AppInfoDialog::AppInfoDialog(gfx::NativeWindow parent_window,
|
| Profile* profile,
|
| const extensions::Extension* app,
|
| const base::Closure& close_callback)
|
| - : parent_window_(parent_window),
|
| - profile_(profile),
|
| - app_(app),
|
| - close_callback_(close_callback) {
|
| - SetLayoutManager(new views::FillLayout());
|
| + : close_callback_(close_callback) {
|
| + SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
|
| + views::kButtonHEdgeMarginNew,
|
| + views::kButtonVEdgeMarginNew,
|
| + 0));
|
|
|
| views::TabbedPane* tabbed_pane = new views::TabbedPane();
|
| AddChildView(tabbed_pane);
|
|
|
| tabbed_pane->AddTab(
|
| l10n_util::GetStringUTF16(IDS_APPLICATION_INFO_SUMMARY_TAB_TITLE),
|
| - new AppInfoSummaryTab(parent_window_, profile_, app_, close_callback_));
|
| + new AppInfoSummaryTab(parent_window, profile, app, close_callback));
|
| tabbed_pane->AddTab(
|
| l10n_util::GetStringUTF16(IDS_APPLICATION_INFO_PERMISSIONS_TAB_TITLE),
|
| - new AppInfoPermissionsTab(
|
| - parent_window_, profile_, app_, close_callback_));
|
| + new AppInfoPermissionsTab(parent_window, profile, app, close_callback));
|
| // TODO(sashab): Add the manage tab back once there is content for it.
|
| }
|
|
|
| AppInfoDialog::~AppInfoDialog() {}
|
|
|
| -bool AppInfoDialog::Cancel() {
|
| +void AppInfoDialog::WindowClosing() {
|
| + AppListDialogContentsView::WindowClosing();
|
| if (!close_callback_.is_null())
|
| close_callback_.Run();
|
| - return true;
|
| -}
|
| -
|
| -gfx::Size AppInfoDialog::GetPreferredSize() const {
|
| - // These numbers represent the size of the view, not the total size of the
|
| - // dialog. The actual dialog will be slightly taller (have a larger height)
|
| - // than what is specified here.
|
| - static const int kDialogWidth = 360;
|
| - static const int kDialogHeight = 360;
|
| - return gfx::Size(kDialogWidth, kDialogHeight);
|
| -}
|
| -
|
| -int AppInfoDialog::GetDialogButtons() const { return ui::DIALOG_BUTTON_NONE; }
|
| -
|
| -ui::ModalType AppInfoDialog::GetModalType() const {
|
| - return ui::MODAL_TYPE_WINDOW;
|
| }
|
|
|