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

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

Issue 12843019: Suppress error notifications and detailed view during OOBE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TrayAccessibilityTest Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/system_tray_delegate.h ('k') | ash/system/tray/test_system_tray_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/tray/system_tray_item.h" 5 #include "ash/system/tray/system_tray_item.h"
6 6
7 #include "ash/shell.h"
7 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_delegate.h"
8 #include "ui/views/view.h" 10 #include "ui/views/view.h"
9 11
10 namespace ash { 12 namespace ash {
11 13
12 SystemTrayItem::SystemTrayItem(SystemTray* system_tray) 14 SystemTrayItem::SystemTrayItem(SystemTray* system_tray)
13 : system_tray_(system_tray) { 15 : system_tray_(system_tray) {
14 } 16 }
15 17
16 SystemTrayItem::~SystemTrayItem() { 18 SystemTrayItem::~SystemTrayItem() {
17 } 19 }
(...skipping 30 matching lines...) Expand all
48 system_tray()->ShowDetailedView(this, 0, true, BUBBLE_USE_EXISTING); 50 system_tray()->ShowDetailedView(this, 0, true, BUBBLE_USE_EXISTING);
49 } 51 }
50 52
51 void SystemTrayItem::UpdateAfterLoginStatusChange(user::LoginStatus status) { 53 void SystemTrayItem::UpdateAfterLoginStatusChange(user::LoginStatus status) {
52 } 54 }
53 55
54 void SystemTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { 56 void SystemTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
55 } 57 }
56 58
57 void SystemTrayItem::PopupDetailedView(int for_seconds, bool activate) { 59 void SystemTrayItem::PopupDetailedView(int for_seconds, bool activate) {
60 // Never show a detailed view during OOBE, e.g. from a notification.
61 if (!Shell::GetInstance()->system_tray_delegate()->IsOobeCompleted())
62 return;
58 system_tray()->ShowDetailedView( 63 system_tray()->ShowDetailedView(
59 this, for_seconds, activate, BUBBLE_CREATE_NEW); 64 this, for_seconds, activate, BUBBLE_CREATE_NEW);
60 } 65 }
61 66
62 void SystemTrayItem::SetDetailedViewCloseDelay(int for_seconds) { 67 void SystemTrayItem::SetDetailedViewCloseDelay(int for_seconds) {
63 system_tray()->SetDetailedViewCloseDelay(for_seconds); 68 system_tray()->SetDetailedViewCloseDelay(for_seconds);
64 } 69 }
65 70
66 void SystemTrayItem::HideDetailedView() { 71 void SystemTrayItem::HideDetailedView() {
67 system_tray()->HideDetailedView(this); 72 system_tray()->HideDetailedView(this);
68 } 73 }
69 74
70 void SystemTrayItem::ShowNotificationView() { 75 void SystemTrayItem::ShowNotificationView() {
71 system_tray()->ShowNotificationView(this); 76 system_tray()->ShowNotificationView(this);
72 } 77 }
73 78
74 void SystemTrayItem::HideNotificationView() { 79 void SystemTrayItem::HideNotificationView() {
75 system_tray()->HideNotificationView(this); 80 system_tray()->HideNotificationView(this);
76 } 81 }
77 82
78 bool SystemTrayItem::ShouldHideArrow() const { 83 bool SystemTrayItem::ShouldHideArrow() const {
79 return false; 84 return false;
80 } 85 }
81 86
82 bool SystemTrayItem::ShouldShowLauncher() const { 87 bool SystemTrayItem::ShouldShowLauncher() const {
83 return true; 88 return true;
84 } 89 }
85 90
86 } // namespace ash 91 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_delegate.h ('k') | ash/system/tray/test_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698