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

Side by Side Diff: ui/message_center/views/message_center_bubble.cc

Issue 2054473003: Implement update notifications for ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/views/message_center_bubble.h" 5 #include "ui/message_center/views/message_center_bubble.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "ui/base/l10n/l10n_util.h" 8 #include "ui/base/l10n/l10n_util.h"
9 #include "ui/message_center/message_center_style.h" 9 #include "ui/message_center/message_center_style.h"
10 #include "ui/message_center/views/message_center_view.h" 10 #include "ui/message_center/views/message_center_view.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 message_center_view_ = new MessageCenterView( 96 message_center_view_ = new MessageCenterView(
97 message_center(), tray(), max_height(), initially_settings_visible_, 97 message_center(), tray(), max_height(), initially_settings_visible_,
98 false); /* MessageCenterBubble should be used only on ChromeOS. 98 false); /* MessageCenterBubble should be used only on ChromeOS.
99 Message center is never shown top down in ChromeOS. */ 99 Message center is never shown top down in ChromeOS. */
100 bubble_view()->AddChildView(new ContentsView(this, message_center_view_)); 100 bubble_view()->AddChildView(new ContentsView(this, message_center_view_));
101 // Resize the content of the bubble view to the given bubble size. This is 101 // Resize the content of the bubble view to the given bubble size. This is
102 // necessary in case of the bubble border forcing a bigger size then the 102 // necessary in case of the bubble border forcing a bigger size then the
103 // |new_bubble_view| actually wants. See crbug.com/169390. 103 // |new_bubble_view| actually wants. See crbug.com/169390.
104 bubble_view()->Layout(); 104 bubble_view()->Layout();
105 UpdateBubbleView(); 105 UpdateBubbleView();
106 bubble_view()
107 ->GetFocusManager()
108 ->GetNextFocusableView(nullptr, nullptr, false, false)
109 ->RequestFocus();
106 } 110 }
107 111
108 void MessageCenterBubble::OnBubbleViewDestroyed() { 112 void MessageCenterBubble::OnBubbleViewDestroyed() {
109 message_center_view_ = NULL; 113 message_center_view_ = NULL;
110 } 114 }
111 115
112 void MessageCenterBubble::UpdateBubbleView() { 116 void MessageCenterBubble::UpdateBubbleView() {
113 if (!bubble_view()) 117 if (!bubble_view())
114 return; // Could get called after view is closed 118 return; // Could get called after view is closed
115 const NotificationList::Notifications& notifications = 119 const NotificationList::Notifications& notifications =
(...skipping 13 matching lines...) Expand all
129 } 133 }
130 134
131 void MessageCenterBubble::OnMouseExitedView() { 135 void MessageCenterBubble::OnMouseExitedView() {
132 } 136 }
133 137
134 size_t MessageCenterBubble::NumMessageViewsForTest() const { 138 size_t MessageCenterBubble::NumMessageViewsForTest() const {
135 return message_center_view_->NumMessageViewsForTest(); 139 return message_center_view_->NumMessageViewsForTest();
136 } 140 }
137 141
138 } // namespace message_center 142 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698