- add sources.
[platform/framework/web/crosswalk.git] / src / ash / system / tray / tray_empty.cc
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.
4
5 #include "ash/system/tray/tray_empty.h"
6
7 #include "ui/views/layout/box_layout.h"
8 #include "ui/views/background.h"
9 #include "ui/views/view.h"
10
11 namespace {
12
13 class EmptyBackground : public views::Background {
14  public:
15   EmptyBackground() {}
16   virtual ~EmptyBackground() {}
17
18  private:
19   virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE {
20   }
21
22   DISALLOW_COPY_AND_ASSIGN(EmptyBackground);
23 };
24
25 }
26
27 namespace ash {
28 namespace internal {
29
30 TrayEmpty::TrayEmpty(SystemTray* system_tray)
31     : SystemTrayItem(system_tray) {
32 }
33
34 TrayEmpty::~TrayEmpty() {}
35
36 views::View* TrayEmpty::CreateTrayView(user::LoginStatus status) {
37   return NULL;
38 }
39
40 views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) {
41   if (status == user::LOGGED_IN_NONE)
42     return NULL;
43
44   views::View* view = new views::View;
45   view->set_background(new EmptyBackground());
46   view->set_border(views::Border::CreateEmptyBorder(10, 0, 0, 0));
47   view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
48         0, 0, 0));
49   view->SetPaintToLayer(true);
50   view->SetFillsBoundsOpaquely(false);
51   return view;
52 }
53
54 views::View* TrayEmpty::CreateDetailedView(user::LoginStatus status) {
55   return NULL;
56 }
57
58 void TrayEmpty::DestroyTrayView() {}
59
60 void TrayEmpty::DestroyDefaultView() {}
61
62 void TrayEmpty::DestroyDetailedView() {}
63
64 void TrayEmpty::UpdateAfterLoginStatusChange(user::LoginStatus status) {}
65
66 }  // namespace internal
67 }  // namespace ash