| 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..edafcebee544011156ad10ae6cedb4ad895c669a 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,17 @@ 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.
|
| + 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 +63,8 @@ class SubtleNotificationView : public views::View {
|
| // after the instruction text.
|
| views::Link* link_;
|
|
|
| + base::string16 accessible_name_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(SubtleNotificationView);
|
| };
|
|
|
|
|