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

Unified Diff: ash/system/tray/system_tray.cc

Issue 14297013: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 8cbfddc0759a068bb27535d90eb770fccc9f4bc2..2418f8013c3c400d187498bdee0e4c116710f65b 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -213,7 +213,7 @@ void SystemTray::ShowDetailedView(SystemTrayItem* item,
std::vector<SystemTrayItem*> items;
items.push_back(item);
ShowItems(items, true, activate, creation_type, GetTrayXOffset(item));
- if (system_bubble_.get())
+ if (system_bubble_)
system_bubble_->bubble()->StartAutoCloseTimer(close_delay);
}
@@ -244,7 +244,7 @@ void SystemTray::HideNotificationView(SystemTrayItem* item) {
return;
notification_items_.erase(found_iter);
// Only update the notification bubble if visible (i.e. don't create one).
- if (notification_bubble_.get())
+ if (notification_bubble_)
UpdateNotificationBubble();
}
@@ -271,7 +271,7 @@ void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
}
void SystemTray::SetHideNotifications(bool hide_notifications) {
- if (notification_bubble_.get())
+ if (notification_bubble_)
notification_bubble_->bubble()->SetVisible(!hide_notifications);
hide_notifications_ = hide_notifications;
}
@@ -289,7 +289,7 @@ bool SystemTray::HasNotificationBubble() const {
}
internal::SystemTrayBubble* SystemTray::GetSystemBubble() {
- if (!system_bubble_.get())
+ if (!system_bubble_)
return NULL;
return system_bubble_->bubble();
}
@@ -302,21 +302,21 @@ bool SystemTray::IsAnyBubbleVisible() const {
}
bool SystemTray::IsMouseInNotificationBubble() const {
- if (!notification_bubble_.get())
+ if (!notification_bubble_)
return false;
return notification_bubble_->bubble_view()->GetBoundsInScreen().Contains(
Shell::GetScreen()->GetCursorScreenPoint());
}
bool SystemTray::CloseSystemBubbleForTest() const {
- if (!system_bubble_.get())
+ if (!system_bubble_)
return false;
system_bubble_->bubble()->Close();
return true;
}
bool SystemTray::CloseNotificationBubbleForTest() const {
- if (!notification_bubble_.get())
+ if (!notification_bubble_)
return false;
notification_bubble_->bubble()->Close();
return true;
@@ -474,20 +474,20 @@ void SystemTray::SetShelfAlignment(ShelfAlignment alignment) {
// Destroy any existing bubble so that it is rebuilt correctly.
system_bubble_.reset();
// Rebuild any notification bubble.
- if (notification_bubble_.get()) {
+ if (notification_bubble_) {
notification_bubble_.reset();
UpdateNotificationBubble();
}
}
void SystemTray::AnchorUpdated() {
- if (notification_bubble_.get()) {
+ if (notification_bubble_) {
notification_bubble_->bubble_view()->UpdateBubble();
// Ensure that the notification buble is above the launcher/status area.
notification_bubble_->bubble_view()->GetWidget()->StackAtTop();
UpdateBubbleViewArrow(notification_bubble_->bubble_view());
}
- if (system_bubble_.get()) {
+ if (system_bubble_) {
system_bubble_->bubble_view()->UpdateBubble();
UpdateBubbleViewArrow(system_bubble_->bubble_view());
}
@@ -509,26 +509,26 @@ void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {
}
bool SystemTray::ClickedOutsideBubble() {
- if (!system_bubble_.get())
+ if (!system_bubble_)
return false;
HideBubbleWithView(system_bubble_->bubble_view());
return true;
}
void SystemTray::BubbleViewDestroyed() {
- if (system_bubble_.get()) {
+ if (system_bubble_) {
system_bubble_->bubble()->DestroyItemViews();
system_bubble_->bubble()->BubbleViewDestroyed();
}
}
void SystemTray::OnMouseEnteredView() {
- if (system_bubble_.get())
+ if (system_bubble_)
system_bubble_->bubble()->StopAutoCloseTimer();
}
void SystemTray::OnMouseExitedView() {
- if (system_bubble_.get())
+ if (system_bubble_)
system_bubble_->bubble()->RestartAutoCloseTimer();
}
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698