Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ash / system / tray / system_tray_item.cc
blob6eb03a1fabd46559b555a4ad8092a807579f0793
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/system_tray_item.h"
7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ui/views/view.h"
12 namespace ash {
14 SystemTrayItem::SystemTrayItem(SystemTray* system_tray)
15 : system_tray_(system_tray),
16 restore_focus_(false) {
19 SystemTrayItem::~SystemTrayItem() {
22 views::View* SystemTrayItem::CreateTrayView(user::LoginStatus status) {
23 return NULL;
26 views::View* SystemTrayItem::CreateDefaultView(user::LoginStatus status) {
27 return NULL;
30 views::View* SystemTrayItem::CreateDetailedView(user::LoginStatus status) {
31 return NULL;
34 views::View* SystemTrayItem::CreateNotificationView(user::LoginStatus status) {
35 return NULL;
38 void SystemTrayItem::DestroyTrayView() {
41 void SystemTrayItem::DestroyDefaultView() {
44 void SystemTrayItem::DestroyDetailedView() {
47 void SystemTrayItem::DestroyNotificationView() {
50 void SystemTrayItem::TransitionDetailedView() {
51 system_tray()->ShowDetailedView(this, 0, true, BUBBLE_USE_EXISTING);
54 void SystemTrayItem::UpdateAfterLoginStatusChange(user::LoginStatus status) {
57 void SystemTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
60 void SystemTrayItem::PopupDetailedView(int for_seconds, bool activate) {
61 system_tray()->ShowDetailedView(
62 this, for_seconds, activate, BUBBLE_CREATE_NEW);
65 void SystemTrayItem::SetDetailedViewCloseDelay(int for_seconds) {
66 system_tray()->SetDetailedViewCloseDelay(for_seconds);
69 void SystemTrayItem::HideDetailedView() {
70 system_tray()->HideDetailedView(this);
73 void SystemTrayItem::ShowNotificationView() {
74 system_tray()->ShowNotificationView(this);
77 void SystemTrayItem::HideNotificationView() {
78 system_tray()->HideNotificationView(this);
81 bool SystemTrayItem::ShouldHideArrow() const {
82 return false;
85 bool SystemTrayItem::ShouldShowShelf() const {
86 return true;
89 } // namespace ash