summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/native_widget.h3
-rw-r--r--views/widget/widget_gtk.cc4
-rw-r--r--views/widget/widget_gtk.h1
-rw-r--r--views/widget/widget_win.cc4
-rw-r--r--views/widget/widget_win.h1
5 files changed, 13 insertions, 0 deletions
diff --git a/views/widget/native_widget.h b/views/widget/native_widget.h
index fadad34..bba7f5e 100644
--- a/views/widget/native_widget.h
+++ b/views/widget/native_widget.h
@@ -60,6 +60,9 @@ class NativeWidget {
// to update tooltips.
virtual TooltipManager* GetTooltipManager() const = 0;
+ // Returns true if a system screen reader is active for the NativeWidget.
+ virtual bool IsScreenReaderActive() const = 0;
+
// Widget pass-thrus ---------------------------------------------------------
// TODO(beng): Investigate if we can move these to a NativeWidgetPrivate
// interface.
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index fe23dbb..afe6abe 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -708,6 +708,10 @@ TooltipManager* WidgetGtk::GetTooltipManager() const {
return tooltip_manager_.get();
}
+bool WidgetGtk::IsScreenReaderActive() const {
+ return false;
+}
+
gfx::Rect WidgetGtk::GetWindowScreenBounds() const {
// Client == Window bounds on Gtk.
return GetClientAreaScreenBounds();
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index 5a601a5..308a5c0 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -177,6 +177,7 @@ class WidgetGtk : public Widget,
virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
virtual void* GetNativeWindowProperty(const char* name) OVERRIDE;
virtual TooltipManager* GetTooltipManager() const OVERRIDE;
+ virtual bool IsScreenReaderActive() const OVERRIDE;
virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE;
virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 8eff3c9..b557953 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -265,6 +265,10 @@ TooltipManager* WidgetWin::GetTooltipManager() const {
return tooltip_manager_.get();
}
+bool WidgetWin::IsScreenReaderActive() const {
+ return screen_reader_active_;
+}
+
gfx::Rect WidgetWin::GetWindowScreenBounds() const {
RECT r;
GetWindowRect(&r);
diff --git a/views/widget/widget_win.h b/views/widget/widget_win.h
index d96d384..e6e450b 100644
--- a/views/widget/widget_win.h
+++ b/views/widget/widget_win.h
@@ -202,6 +202,7 @@ class WidgetWin : public ui::WindowImpl,
virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE;
virtual void* GetNativeWindowProperty(const char* name) OVERRIDE;
virtual TooltipManager* GetTooltipManager() const OVERRIDE;
+ virtual bool IsScreenReaderActive() const OVERRIDE;
virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE;
virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;