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

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

Issue 2897553002: Do not activate TrayBubbleView by default (Closed)
Patch Set: Remove unnecessary code. 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
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 9154a43ca60aade4be5f9aa52e4788dd49d3c496..6800c8775863171c70d99c89fd0aa0ec002c8a8c 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -4,6 +4,8 @@
#include "ash/system/web_notification/web_notification_tray.h"
+#include "ash/accelerators/accelerator_controller.h"
+#include "ash/accessibility_delegate.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/root_window_controller.h"
#include "ash/session/session_controller.h"
@@ -92,7 +94,6 @@ class WebNotificationBubbleWrapper {
init_params.min_width = width;
init_params.max_width = width;
init_params.max_height = bubble->max_height();
- init_params.can_activate = true;
init_params.bg_color = message_center::kBackgroundDarkColor;
views::TrayBubbleView* bubble_view = new views::TrayBubbleView(init_params);
@@ -455,10 +456,26 @@ void WebNotificationTray::OnMouseEnteredView() {}
void WebNotificationTray::OnMouseExitedView() {}
+void WebNotificationTray::RegisterAccelerators(
+ const std::vector<ui::Accelerator>& accelerators,
+ views::TrayBubbleView* tray_bubble_view) {
+ Shell::Get()->accelerator_controller()->Register(accelerators,
+ tray_bubble_view);
+}
+
+void WebNotificationTray::UnregisterAllAccelerators(
+ views::TrayBubbleView* tray_bubble_view) {
+ Shell::Get()->accelerator_controller()->UnregisterAll(tray_bubble_view);
+}
+
base::string16 WebNotificationTray::GetAccessibleNameForBubble() {
return GetAccessibleNameForTray();
}
+bool WebNotificationTray::ShouldEnableExtraKeyboardAccessibility() {
+ return Shell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled();
+}
+
void WebNotificationTray::HideBubble(const views::TrayBubbleView* bubble_view) {
HideBubbleWithView(bubble_view);
}

Powered by Google App Engine
This is Rietveld 408576698