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

Unified Diff: ash/system/tray_accessibility.cc

Issue 10235010: Prepare SystemTray to support notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/tray_accessibility.cc
diff --git a/ash/system/tray_accessibility.cc b/ash/system/tray_accessibility.cc
index 1332d7141dacfbc96d30e16a80e6f893c63e0d9e..5ccebf4c0340d7b021a1575a81205e1d32b553c7 100644
--- a/ash/system/tray_accessibility.cc
+++ b/ash/system/tray_accessibility.cc
@@ -20,6 +20,7 @@ namespace internal {
TrayAccessibility::TrayAccessibility()
: TrayImageItem(IDR_AURA_UBER_TRAY_ACCESSIBILITY),
+ detailed_(NULL),
string_id_(0) {
}
@@ -31,7 +32,8 @@ bool TrayAccessibility::GetInitialVisibility() {
views::View* TrayAccessibility::CreateDetailedView(user::LoginStatus status) {
DCHECK(string_id_);
- detailed_.reset(new views::View);
+ DCHECK(detailed_ == NULL);
+ detailed_ = new views::View;
detailed_->SetLayoutManager(new
views::BoxLayout(views::BoxLayout::kHorizontal,
@@ -46,11 +48,11 @@ views::View* TrayAccessibility::CreateDetailedView(user::LoginStatus status) {
detailed_->AddChildView(new views::Label(
bundle.GetLocalizedString(string_id_)));
- return detailed_.get();
+ return detailed_;
}
void TrayAccessibility::DestroyDetailedView() {
- detailed_.reset();
+ detailed_ = NULL;
}
void TrayAccessibility::OnAccessibilityModeChanged(bool enabled,
@@ -61,7 +63,7 @@ void TrayAccessibility::OnAccessibilityModeChanged(bool enabled,
if (enabled) {
string_id_ = string_id;
PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false);
- } else if (detailed_.get()) {
+ } else if (detailed_) {
string_id_ = 0;
detailed_->GetWidget()->Close();
}

Powered by Google App Engine
This is Rietveld 408576698