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

Unified Diff: ash/system/tray_accessibility.cc

Issue 10269017: Remove scoped_ptr for system tray views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
« no previous file with comments | « ash/system/tray_accessibility.h ('k') | ash/system/tray_caps_lock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray_accessibility.cc
diff --git a/ash/system/tray_accessibility.cc b/ash/system/tray_accessibility.cc
index 1332d7141dacfbc96d30e16a80e6f893c63e0d9e..5be1e384ef0a95b2e49a62be0479044e1f489584 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);
+ CHECK(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();
}
« no previous file with comments | « ash/system/tray_accessibility.h ('k') | ash/system/tray_caps_lock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698