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

Side by Side Diff: chrome/browser/accessibility/accessibility_events.h

Issue 600063002: Draw a focus ring around native views when ChromeVox is running. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add check for Chrome OS Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/accessibility/accessibility_events.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ 5 #ifndef CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_
6 #define CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ 6 #define CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_
7 7
8 #include <string> 8 #include <string>
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/accessibility/ax_enums.h" 10 #include "ui/accessibility/ax_enums.h"
11 #include "ui/gfx/rect.h"
11 12
12 class AccessibilityControlInfo; 13 class AccessibilityControlInfo;
13 class AccessibilityMenuInfo; 14 class AccessibilityMenuInfo;
14 class AccessibilityWindowInfo; 15 class AccessibilityWindowInfo;
15 class Profile; 16 class Profile;
16 17
17 namespace base { 18 namespace base {
18 class DictionaryValue; 19 class DictionaryValue;
19 } 20 }
20 21
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; 64 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE;
64 65
65 // Return the specific type of this control, which will be one of the 66 // Return the specific type of this control, which will be one of the
66 // string constants defined in extension_accessibility_api_constants.h. 67 // string constants defined in extension_accessibility_api_constants.h.
67 virtual const char* type() const = 0; 68 virtual const char* type() const = 0;
68 69
69 const std::string& name() const { return name_; } 70 const std::string& name() const { return name_; }
70 71
71 const std::string& context() const { return context_; } 72 const std::string& context() const { return context_; }
72 73
74 void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; }
75 const gfx::Rect& bounds() const { return bounds_; }
76
73 protected: 77 protected:
74 AccessibilityControlInfo(Profile* profile, 78 AccessibilityControlInfo(Profile* profile,
75 const std::string& name); 79 const std::string& name);
76 80
77 void set_context(const std::string& context) { context_ = context; } 81 void set_context(const std::string& context) { context_ = context; }
78 82
79 // The name of the control, like "OK" or "Password". 83 // The name of the control, like "OK" or "Password".
80 std::string name_; 84 std::string name_;
81 85
82 // A string describing the context of the control, such as the name of 86 // A string describing the context of the control, such as the name of
83 // the group or toolbar it's contained in. 87 // the group or toolbar it's contained in.
84 std::string context_; 88 std::string context_;
89
90 // The bounds of the control in global screen coordinates.
91 gfx::Rect bounds_;
85 }; 92 };
86 93
87 // Accessibility information about a window passed to onWindowOpened 94 // Accessibility information about a window passed to onWindowOpened
88 // and onWindowClosed event listeners. 95 // and onWindowClosed event listeners.
89 class AccessibilityWindowInfo : public AccessibilityControlInfo { 96 class AccessibilityWindowInfo : public AccessibilityControlInfo {
90 public: 97 public:
91 AccessibilityWindowInfo(Profile* profile, const std::string& window_name); 98 AccessibilityWindowInfo(Profile* profile, const std::string& window_name);
92 99
93 virtual const char* type() const OVERRIDE; 100 virtual const char* type() const OVERRIDE;
94 }; 101 };
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 411
405 // Accessibility information about an alert passed to onControlAction event. 412 // Accessibility information about an alert passed to onControlAction event.
406 class AccessibilityAlertInfo : public AccessibilityControlInfo { 413 class AccessibilityAlertInfo : public AccessibilityControlInfo {
407 public: 414 public:
408 AccessibilityAlertInfo(Profile* profile, const std::string& name); 415 AccessibilityAlertInfo(Profile* profile, const std::string& name);
409 416
410 virtual const char* type() const OVERRIDE; 417 virtual const char* type() const OVERRIDE;
411 }; 418 };
412 419
413 #endif // CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_ 420 #endif // CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_EVENTS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/accessibility/accessibility_events.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698