Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / ash / system / tray / tray_empty.cc
blob821632233af35a6562ddaa3aabad9b63d40bb2da
1 // Copyright (c) 2012 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.
5 #include "ash/system/tray/tray_empty.h"
7 #include "ui/views/layout/box_layout.h"
8 #include "ui/views/background.h"
9 #include "ui/views/border.h"
10 #include "ui/views/view.h"
12 namespace {
14 class EmptyBackground : public views::Background {
15 public:
16 EmptyBackground() {}
17 ~EmptyBackground() override {}
19 private:
20 void Paint(gfx::Canvas* canvas, views::View* view) const override {}
22 DISALLOW_COPY_AND_ASSIGN(EmptyBackground);
27 namespace ash {
29 TrayEmpty::TrayEmpty(SystemTray* system_tray)
30 : SystemTrayItem(system_tray) {
33 TrayEmpty::~TrayEmpty() {}
35 views::View* TrayEmpty::CreateTrayView(user::LoginStatus status) {
36 return NULL;
39 views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) {
40 if (status == user::LOGGED_IN_NONE)
41 return NULL;
43 views::View* view = new views::View;
44 view->set_background(new EmptyBackground());
45 view->SetBorder(views::Border::CreateEmptyBorder(10, 0, 0, 0));
46 view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
47 0, 0, 0));
48 view->SetPaintToLayer(true);
49 view->SetFillsBoundsOpaquely(false);
50 return view;
53 views::View* TrayEmpty::CreateDetailedView(user::LoginStatus status) {
54 return NULL;
57 void TrayEmpty::DestroyTrayView() {}
59 void TrayEmpty::DestroyDefaultView() {}
61 void TrayEmpty::DestroyDetailedView() {}
63 void TrayEmpty::UpdateAfterLoginStatusChange(user::LoginStatus status) {}
65 } // namespace ash