Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: ash/common/system/tray/system_tray_item.cc

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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/common/system/tray/system_tray_item.h"
6
7 #include "ash/common/system/tray/system_tray.h"
8 #include "ash/common/system/tray/system_tray_delegate.h"
9 #include "ash/common/system/tray/tray_constants.h"
10 #include "base/timer/timer.h"
11 #include "ui/views/view.h"
12
13 namespace ash {
14
15 SystemTrayItem::SystemTrayItem(SystemTray* system_tray, UmaType uma_type)
16 : system_tray_(system_tray), uma_type_(uma_type), restore_focus_(false) {}
17
18 SystemTrayItem::~SystemTrayItem() {}
19
20 views::View* SystemTrayItem::CreateTrayView(LoginStatus status) {
21 return nullptr;
22 }
23
24 views::View* SystemTrayItem::CreateDefaultView(LoginStatus status) {
25 return nullptr;
26 }
27
28 views::View* SystemTrayItem::CreateDetailedView(LoginStatus status) {
29 return nullptr;
30 }
31
32 void SystemTrayItem::DestroyTrayView() {}
33
34 void SystemTrayItem::DestroyDefaultView() {}
35
36 void SystemTrayItem::DestroyDetailedView() {}
37
38 void SystemTrayItem::TransitionDetailedView() {
39 transition_delay_timer_.Start(
40 FROM_HERE,
41 base::TimeDelta::FromMilliseconds(kTrayDetailedViewTransitionDelayMs),
42 base::Bind(&SystemTray::ShowDetailedView, base::Unretained(system_tray()),
43 this, 0, true, BUBBLE_USE_EXISTING));
44 }
45
46 void SystemTrayItem::UpdateAfterLoginStatusChange(LoginStatus status) {}
47
48 void SystemTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
49 }
50
51 void SystemTrayItem::PopupDetailedView(int for_seconds, bool activate) {
52 system_tray()->ShowDetailedView(this, for_seconds, activate,
53 BUBBLE_CREATE_NEW);
54 }
55
56 void SystemTrayItem::SetDetailedViewCloseDelay(int for_seconds) {
57 system_tray()->SetDetailedViewCloseDelay(for_seconds);
58 }
59
60 void SystemTrayItem::HideDetailedView(bool animate) {
61 system_tray()->HideDetailedView(this, animate);
62 }
63
64 bool SystemTrayItem::ShouldShowShelf() const {
65 return true;
66 }
67
68 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray_item.h ('k') | ash/common/system/tray/system_tray_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698