1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h" 6 7 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/views/controls/label.h" 9 #include "ui/views/layout/box_layout.h" 10 #include "ui/views/layout/layout_constants.h" 11 12 AppInfoPanel::AppInfoPanel(Profile* profile, const extensions::Extension* app) 13 : profile_(profile), app_(app) { 14 } 15 16 AppInfoPanel::~AppInfoPanel() { 17 } 18 19 views::Label* AppInfoPanel::CreateHeading(const base::string16& text) const { 20 views::Label* label = new views::Label(text); 21 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 22 label->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList( 23 ui::ResourceBundle::MediumFont)); 24 return label; 25 } 26 27 views::View* AppInfoPanel::CreateVerticalStack() const { 28 views::View* vertically_stacked_view = new views::View(); 29 vertically_stacked_view->SetLayoutManager( 30 new views::BoxLayout(views::BoxLayout::kVertical, 31 0, 32 0, 33 views::kRelatedControlVerticalSpacing)); 34 return vertically_stacked_view; 35 } 36