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

Unified Diff: ash/system/web_notification/web_notification_tray.cc

Issue 10825389: Fix accessability for web notification tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix asan bug Created 8 years, 4 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/web_notification/web_notification_tray.h ('k') | ash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/web_notification_tray.cc
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc
index f70d192127accc554662434cf27eff666d30ebec..31c4cdb411655552ad704bb537a887aca364a63e 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -5,7 +5,6 @@
#include "ash/system/web_notification/web_notification_tray.h"
#include "ash/system/status_area_widget.h"
-#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/tray_bubble_view.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_views.h"
@@ -717,6 +716,7 @@ class WebNotificationTray::Bubble : public TrayBubbleView::Host,
init_params.bubble_width = kWebNotificationWidth;
if (bubble_type == BUBBLE_TYPE_MESAGE_CENTER) {
init_params.max_height = kWebNotificationBubbleMaxHeight;
+ init_params.can_activate = true;
} else {
init_params.arrow_color = kBackgroundColor;
init_params.close_on_deactivate = false;
@@ -790,6 +790,10 @@ class WebNotificationTray::Bubble : public TrayBubbleView::Host,
tray_->HideMessageCenterBubble();
}
+ virtual string16 GetAccessibleName() OVERRIDE {
+ return tray_->GetAccessibleName();
+ }
+
// Overridden from views::WidgetObserver:
virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE {
CHECK_EQ(bubble_widget_, widget);
@@ -854,6 +858,10 @@ WebNotificationTray::WebNotificationTray(
}
WebNotificationTray::~WebNotificationTray() {
+ // Release any child views that might have back pointers before ~View().
+ notification_list_.reset();
+ message_center_bubble_.reset();
+ notification_bubble_.reset();
}
void WebNotificationTray::SetDelegate(Delegate* delegate) {
@@ -997,6 +1005,11 @@ void WebNotificationTray::AnchorUpdated() {
message_center_bubble_->bubble_view()->UpdateBubble();
}
+string16 WebNotificationTray::GetAccessibleName() {
+ return l10n_util::GetStringUTF16(
+ IDS_ASH_WEB_NOTIFICATION_TRAY_ACCESSIBLE_NAME);
+}
+
// Protected methods (invoked only from Bubble and its child classes)
void WebNotificationTray::SendRemoveNotification(const std::string& id) {
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | ash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698