OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 "ash/login/views/contents_view.h" | |
6 | |
7 #include "base/strings/utf_string_conversions.h" | |
8 #include "ui/views/background.h" | |
9 #include "ui/views/border.h" | |
10 #include "ui/views/layout/box_layout.h" | |
11 | |
12 namespace ash { | |
13 | |
14 ContentsView::ContentsView() { | |
15 auto* layout = new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0); | |
16 SetLayoutManager(layout); | |
17 | |
18 { | |
James Cook
2017/05/08 22:04:20
any particular reason you're introducing new scope
jdufault
2017/05/08 23:02:34
Removed (I originally had a few more labels for te
| |
19 views::Label* label = new views::Label(); | |
20 label->SetBorder(views::CreateEmptyBorder(2, 3, 4, 5)); | |
21 label->set_background(views::Background::CreateThemedSolidBackground( | |
22 label, ui::NativeTheme::kColorId_BubbleBackground)); | |
23 label->SetText(base::ASCIIToUTF16("User")); | |
24 AddChildView(label); | |
25 } | |
26 { | |
27 unlock_button_ = | |
28 views::MdTextButton::Create(this, base::ASCIIToUTF16("Unlock")); | |
29 AddChildView(unlock_button_); | |
30 } | |
31 } | |
32 | |
33 ContentsView::~ContentsView() {} | |
34 | |
35 void ContentsView::ButtonPressed(views::Button* sender, | |
36 const ui::Event& event) { | |
37 DCHECK(unlock_button_ == sender); | |
38 | |
39 // TODO: Run mojo call that talks to backend which unlocks the device. | |
40 NOTIMPLEMENTED(); | |
41 } | |
42 | |
43 } // namespace ash | |
OLD | NEW |