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

Side by Side Diff: trunk/src/ash/system/date/tray_date.cc

Issue 14200034: Revert 194578 "Add ash SessionStateDelegate" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 | « trunk/src/ash/shell_unittest.cc ('k') | trunk/src/ash/system/tray/test_system_tray_delegate.cc » ('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/date/tray_date.h" 5 #include "ash/system/date/tray_date.h"
6 6
7 #include "ash/session_state_delegate.h"
8 #include "ash/shell.h" 7 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
10 #include "ash/system/date/date_view.h" 9 #include "ash/system/date/date_view.h"
11 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
12 #include "ash/system/tray/system_tray_delegate.h" 11 #include "ash/system/tray/system_tray_delegate.h"
13 #include "ash/system/tray/system_tray_notifier.h" 12 #include "ash/system/tray/system_tray_notifier.h"
14 #include "ash/system/tray/tray_constants.h" 13 #include "ash/system/tray/tray_constants.h"
15 #include "ash/system/tray/tray_item_view.h" 14 #include "ash/system/tray/tray_item_view.h"
16 #include "ash/system/tray/tray_popup_header_button.h" 15 #include "ash/system/tray/tray_popup_header_button.h"
17 #include "base/i18n/time_formatting.h" 16 #include "base/i18n/time_formatting.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 IDR_AURA_UBER_TRAY_SHUTDOWN, 82 IDR_AURA_UBER_TRAY_SHUTDOWN,
84 IDR_AURA_UBER_TRAY_SHUTDOWN, 83 IDR_AURA_UBER_TRAY_SHUTDOWN,
85 IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER, 84 IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER,
86 IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER, 85 IDR_AURA_UBER_TRAY_SHUTDOWN_HOVER,
87 IDS_ASH_STATUS_TRAY_SHUTDOWN); 86 IDS_ASH_STATUS_TRAY_SHUTDOWN);
88 shutdown_->SetTooltipText( 87 shutdown_->SetTooltipText(
89 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SHUTDOWN)); 88 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SHUTDOWN));
90 view->AddButton(shutdown_); 89 view->AddButton(shutdown_);
91 } 90 }
92 91
93 if (ash::Shell::GetInstance()->session_state_delegate()->CanLockScreen()) { 92 if (ash::Shell::GetInstance()->CanLockScreen()) {
94 lock_ = new ash::internal::TrayPopupHeaderButton(this, 93 lock_ = new ash::internal::TrayPopupHeaderButton(this,
95 IDR_AURA_UBER_TRAY_LOCKSCREEN, 94 IDR_AURA_UBER_TRAY_LOCKSCREEN,
96 IDR_AURA_UBER_TRAY_LOCKSCREEN, 95 IDR_AURA_UBER_TRAY_LOCKSCREEN,
97 IDR_AURA_UBER_TRAY_LOCKSCREEN_HOVER, 96 IDR_AURA_UBER_TRAY_LOCKSCREEN_HOVER,
98 IDR_AURA_UBER_TRAY_LOCKSCREEN_HOVER, 97 IDR_AURA_UBER_TRAY_LOCKSCREEN_HOVER,
99 IDS_ASH_STATUS_TRAY_LOCK); 98 IDS_ASH_STATUS_TRAY_LOCK);
100 lock_->SetTooltipText( 99 lock_->SetTooltipText(
101 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCK)); 100 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCK));
102 view->AddButton(lock_); 101 view->AddButton(lock_);
103 } 102 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 time_tray_->UpdateTimeFormat(); 199 time_tray_->UpdateTimeFormat();
201 } 200 }
202 201
203 void TrayDate::Refresh() { 202 void TrayDate::Refresh() {
204 if (time_tray_) 203 if (time_tray_)
205 time_tray_->UpdateText(); 204 time_tray_->UpdateText();
206 } 205 }
207 206
208 } // namespace internal 207 } // namespace internal
209 } // namespace ash 208 } // namespace ash
OLDNEW
« no previous file with comments | « trunk/src/ash/shell_unittest.cc ('k') | trunk/src/ash/system/tray/test_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698