OLD | NEW |
| (Empty) |
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 #include "ui/base/resource/resource_bundle.h" | |
7 #include "ui/views/controls/label.h" | |
8 #include "ui/views/layout/box_layout.h" | |
9 #include "ui/views/layout/layout_constants.h" | |
10 #include "ui/views/view.h" | |
11 | |
12 AppInfoPanel::AppInfoPanel(gfx::NativeWindow parent_window, | |
13 Profile* profile, | |
14 const extensions::Extension* app, | |
15 const base::Closure& close_callback) | |
16 : parent_window_(parent_window), | |
17 profile_(profile), | |
18 app_(app), | |
19 close_callback_(close_callback) { | |
20 } | |
21 | |
22 AppInfoPanel::~AppInfoPanel() { | |
23 } | |
24 | |
25 views::Label* AppInfoPanel::CreateHeading(const base::string16& text) const { | |
26 views::Label* label = new views::Label(text); | |
27 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | |
28 label->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList( | |
29 ui::ResourceBundle::MediumFont)); | |
30 return label; | |
31 } | |
32 | |
33 views::View* AppInfoPanel::CreateVerticalStack() const { | |
34 views::View* vertically_stacked_view = new views::View(); | |
35 vertically_stacked_view->SetLayoutManager( | |
36 new views::BoxLayout(views::BoxLayout::kVertical, | |
37 0, | |
38 0, | |
39 views::kRelatedControlVerticalSpacing)); | |
40 return vertically_stacked_view; | |
41 } | |
OLD | NEW |