diff options
Diffstat (limited to 'chromium/ash/system/tray/tray_empty.cc')
-rw-r--r-- | chromium/ash/system/tray/tray_empty.cc | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/chromium/ash/system/tray/tray_empty.cc b/chromium/ash/system/tray/tray_empty.cc new file mode 100644 index 00000000000..f15f7b31e73 --- /dev/null +++ b/chromium/ash/system/tray/tray_empty.cc @@ -0,0 +1,68 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/system/tray/tray_empty.h" + +#include "ui/views/layout/box_layout.h" +#include "ui/views/background.h" +#include "ui/views/border.h" +#include "ui/views/view.h" + +namespace { + +class EmptyBackground : public views::Background { + public: + EmptyBackground() {} + virtual ~EmptyBackground() {} + + private: + virtual void Paint(gfx::Canvas* canvas, views::View* view) const OVERRIDE { + } + + DISALLOW_COPY_AND_ASSIGN(EmptyBackground); +}; + +} + +namespace ash { +namespace internal { + +TrayEmpty::TrayEmpty(SystemTray* system_tray) + : SystemTrayItem(system_tray) { +} + +TrayEmpty::~TrayEmpty() {} + +views::View* TrayEmpty::CreateTrayView(user::LoginStatus status) { + return NULL; +} + +views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) { + if (status == user::LOGGED_IN_NONE) + return NULL; + + views::View* view = new views::View; + view->set_background(new EmptyBackground()); + view->set_border(views::Border::CreateEmptyBorder(10, 0, 0, 0)); + view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, + 0, 0, 0)); + view->SetPaintToLayer(true); + view->SetFillsBoundsOpaquely(false); + return view; +} + +views::View* TrayEmpty::CreateDetailedView(user::LoginStatus status) { + return NULL; +} + +void TrayEmpty::DestroyTrayView() {} + +void TrayEmpty::DestroyDefaultView() {} + +void TrayEmpty::DestroyDetailedView() {} + +void TrayEmpty::UpdateAfterLoginStatusChange(user::LoginStatus status) {} + +} // namespace internal +} // namespace ash |