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

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

Issue 2958693002: Reland with a fix: Do not activate TrayBubbleView by default (Closed)
Patch Set: Add a fix. Created 3 years, 6 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/system_tray_bubble.h ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_bubble.cc
diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc
index bf94470ed85f0c75f6784d3d8513fc6c2e1cc0de..bd6393915b5e3ab46662fad1acb509894826eb47 100644
--- a/ash/system/tray/system_tray_bubble.cc
+++ b/ash/system/tray/system_tray_bubble.cc
@@ -84,7 +84,7 @@ SystemTrayBubble::~SystemTrayBubble() {
DestroyItemViews();
// Reset the host pointer in bubble_view_ in case its destruction is deferred.
if (bubble_view_)
- bubble_view_->reset_delegate();
+ bubble_view_->ResetDelegate();
}
void SystemTrayBubble::UpdateView(
@@ -183,6 +183,9 @@ void SystemTrayBubble::UpdateView(
}
}
}
+
+ // Update bubble as size might have changed.
+ bubble_view_->UpdateBubble();
yawano 2017/06/26 04:02:30 It is necessary to call here. TrayBubbleView::Upd
}
void SystemTrayBubble::InitView(views::View* anchor,
@@ -210,17 +213,6 @@ void SystemTrayBubble::InitView(views::View* anchor,
}
}
-void SystemTrayBubble::FocusDefaultIfNeeded() {
- views::FocusManager* manager = bubble_view_->GetFocusManager();
- if (!manager || manager->GetFocusedView())
- return;
-
- views::View* view =
- manager->GetNextFocusableView(nullptr, nullptr, false, false);
- if (view)
- view->RequestFocus();
-}
-
void SystemTrayBubble::DestroyItemViews() {
for (std::vector<ash::SystemTrayItem*>::iterator it = items_.begin();
it != items_.end(); ++it) {
« no previous file with comments | « ash/system/tray/system_tray_bubble.h ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698