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

Unified Diff: ui/message_center/views/message_center_bubble.cc

Issue 2124093003: Fix crash on clicking the web notification tray (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_center_bubble.cc
diff --git a/ui/message_center/views/message_center_bubble.cc b/ui/message_center/views/message_center_bubble.cc
index c65587b2537f1906159a3772a49b0ae6fc717bdc..dac29a81a4a128ebdc0ad7808ef518ca547f999a 100644
--- a/ui/message_center/views/message_center_bubble.cc
+++ b/ui/message_center/views/message_center_bubble.cc
@@ -107,10 +107,12 @@ void MessageCenterBubble::InitializeContents(
// |new_bubble_view| actually wants. See crbug.com/169390.
bubble_view()->Layout();
UpdateBubbleView();
- bubble_view()
+ DCHECK(bubble_view()->GetFocusManager());
+ views::View* next_focusable_view = bubble_view()
->GetFocusManager()
- ->GetNextFocusableView(nullptr, nullptr, false, false)
- ->RequestFocus();
+ ->GetNextFocusableView(nullptr, nullptr, false, false);
stevenjb 2016/07/07 16:57:12 If we are going to DCHECK on bubble_view()->GetFoc
yoshiki 2016/07/11 18:19:48 Done.
+ if (next_focusable_view)
stevenjb 2016/07/07 16:57:12 Add a comment explaining why next_focusable_view m
yoshiki 2016/07/11 18:19:48 Done.
+ next_focusable_view->RequestFocus();
}
void MessageCenterBubble::OnBubbleViewDestroyed() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698