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

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

Issue 2897553002: Do not activate TrayBubbleView by default (Closed)
Patch Set: Add comment. 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..1bbbef3dab347c72f0ded9fb151daee44b357b81 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"
@@ -428,6 +430,10 @@ base::string16 WebNotificationTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_ACCESSIBLE_NAME);
}
+bool WebNotificationTray::ShouldEnableExtraKeyboardAccessibility() {
James Cook 2017/06/09 16:06:13 nit: functions in .cc should match order in header
yawano 2017/06/12 09:11:03 Done.
+ return Shell::Get()->accessibility_delegate()->IsSpokenFeedbackEnabled();
+}
+
void WebNotificationTray::HideBubbleWithView(
const views::TrayBubbleView* bubble_view) {
if (message_center_bubble() &&
@@ -455,6 +461,18 @@ 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();
}

Powered by Google App Engine
This is Rietveld 408576698