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/lock_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 LockContentsView::LockContentsView() { |
| 15 auto* layout = new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0); |
| 16 SetLayoutManager(layout); |
| 17 |
| 18 views::Label* label = new views::Label(); |
| 19 label->SetBorder(views::CreateEmptyBorder(2, 3, 4, 5)); |
| 20 label->set_background(views::Background::CreateThemedSolidBackground( |
| 21 label, ui::NativeTheme::kColorId_BubbleBackground)); |
| 22 label->SetText(base::ASCIIToUTF16("User")); |
| 23 AddChildView(label); |
| 24 |
| 25 unlock_button_ = |
| 26 views::MdTextButton::Create(this, base::ASCIIToUTF16("Unlock")); |
| 27 AddChildView(unlock_button_); |
| 28 } |
| 29 |
| 30 LockContentsView::~LockContentsView() {} |
| 31 |
| 32 void LockContentsView::ButtonPressed(views::Button* sender, |
| 33 const ui::Event& event) { |
| 34 DCHECK(unlock_button_ == sender); |
| 35 |
| 36 // TODO: Run mojo call that talks to backend which unlocks the device. |
| 37 NOTIMPLEMENTED(); |
| 38 } |
| 39 |
| 40 } // namespace ash |
OLD | NEW |