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

Unified Diff: content/browser/accessibility/browser_accessibility.h

Issue 1768753003: Implemented the reporting of text style and language information on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated to using HashTable from base and GetInheritedStringAttribute instead of specialized methods… Created 4 years, 9 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: content/browser/accessibility/browser_accessibility.h
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h
index edef50d8a9f80d73e7c36b040e30b57cefb6a4d9..20bccede7e9c6bbb0a741b359274b0ee40b07ce5 100644
--- a/content/browser/accessibility/browser_accessibility.h
+++ b/content/browser/accessibility/browser_accessibility.h
@@ -192,7 +192,7 @@ class CONTENT_EXPORT BrowserAccessibility {
//
BrowserAccessibilityManager* manager() const { return manager_; }
- bool instance_active() const { return node_ != NULL; }
+ bool instance_active() const { return node_ && manager_; }
ui::AXNode* node() const { return node_; }
// These access the internal accessibility tree, which doesn't necessarily
@@ -254,6 +254,17 @@ class CONTENT_EXPORT BrowserAccessibility {
float GetFloatAttribute(ui::AXFloatAttribute attr) const;
bool GetFloatAttribute(ui::AXFloatAttribute attr, float* value) const;
+ bool HasInheritedStringAttribute(ui::AXStringAttribute attribute) const;
+ std::string GetInheritedStringAttribute(
+ ui::AXStringAttribute attribute) const;
+ bool GetInheritedStringAttribute(ui::AXStringAttribute attribute,
+ std::string* value) const;
+
+ bool GetInheritedString16Attribute(ui::AXStringAttribute attribute,
+ base::string16* value) const;
+ base::string16 GetInheritedString16Attribute(
+ ui::AXStringAttribute attribute) const;
+
bool HasIntAttribute(ui::AXIntAttribute attribute) const;
int GetIntAttribute(ui::AXIntAttribute attribute) const;
bool GetIntAttribute(ui::AXIntAttribute attribute, int* value) const;
@@ -296,6 +307,8 @@ class CONTENT_EXPORT BrowserAccessibility {
bool* is_defined,
bool* is_mixed) const;
+ base::string16 GetFontFamily() const;
+ base::string16 GetLanguage() const;
virtual base::string16 GetText() const;
// Returns true if the bit corresponding to the given state enum is 1.
@@ -322,6 +335,12 @@ class CONTENT_EXPORT BrowserAccessibility {
protected:
BrowserAccessibility();
+ static void RGBAToColorValues(unsigned int color,
+ unsigned int* red,
+ unsigned int* green,
+ unsigned int* blue,
+ unsigned int* alpha);
+
// The manager of this tree of accessibility objects.
BrowserAccessibilityManager* manager_;

Powered by Google App Engine
This is Rietveld 408576698