Index: chrome/browser/ui/views/subtle_notification_view.h |
diff --git a/chrome/browser/ui/views/subtle_notification_view.h b/chrome/browser/ui/views/subtle_notification_view.h |
index c04296a91029066f04322064425481390ebb8cc4..e17b8951839e8e42ae6f5a01c9a412371afab11f 100644 |
--- a/chrome/browser/ui/views/subtle_notification_view.h |
+++ b/chrome/browser/ui/views/subtle_notification_view.h |
@@ -9,6 +9,11 @@ |
#include "base/strings/string16.h" |
#include "ui/gfx/native_widget_types.h" |
#include "ui/views/view.h" |
+#include "ui/views/widget/widget_observer.h" |
+ |
+namespace ui { |
+struct AXViewState; |
+} |
namespace views { |
class Link; |
@@ -22,7 +27,8 @@ class Widget; |
// auto-dismisses after a short period of time. It also has special |
// functionality for displaying keyboard shortcuts (rendering the keys inside a |
// rounded rectangle). |
-class SubtleNotificationView : public views::View { |
+class SubtleNotificationView : public views::View, |
+ public views::WidgetObserver { |
public: |
explicit SubtleNotificationView(views::LinkListener* link_listener); |
~SubtleNotificationView() override; |
@@ -37,6 +43,18 @@ class SubtleNotificationView : public views::View { |
SubtleNotificationView* view, |
bool accept_events); |
+ // The accessible text for screenreaders to announce on displaying this |
+ // notification, which should have unicode characters expanded. |
+ base::string16 accessible_name() const { return accessible_name_; } |
tapted
2016/07/12 00:51:40
This might not be needed - see if you can update a
Patti Lor
2016/07/19 01:31:51
Done.
|
+ void SetAccessibleName(const base::string16& accessible_name); |
+ |
+ // views::View: |
+ void GetAccessibleState(ui::AXViewState* state) override; |
+ |
+ // views::WidgetObserver: |
+ void OnWidgetClosing(views::Widget* widget) override; |
+ void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; |
+ |
private: |
class InstructionView; |
@@ -46,6 +64,8 @@ class SubtleNotificationView : public views::View { |
// after the instruction text. |
views::Link* link_; |
+ base::string16 accessible_name_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SubtleNotificationView); |
}; |