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

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

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
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 #include "chrome/browser/accessibility/accessibility_events.h" 5 #include "chrome/browser/accessibility/accessibility_events.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/accessibility/accessibility_extension_api.h" 8 #include "chrome/browser/accessibility/accessibility_extension_api.h"
9 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h" 9 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 AccessibilityControlInfo::~AccessibilityControlInfo() { 57 AccessibilityControlInfo::~AccessibilityControlInfo() {
58 } 58 }
59 59
60 void AccessibilityControlInfo::SerializeToDict( 60 void AccessibilityControlInfo::SerializeToDict(
61 base::DictionaryValue *dict) const { 61 base::DictionaryValue *dict) const {
62 dict->SetString(keys::kNameKey, name_); 62 dict->SetString(keys::kNameKey, name_);
63 dict->SetString(keys::kTypeKey, type()); 63 dict->SetString(keys::kTypeKey, type());
64 if (!context_.empty()) 64 if (!context_.empty())
65 dict->SetString(keys::kContextKey, context_); 65 dict->SetString(keys::kContextKey, context_);
66 if (!bounds_.IsEmpty()) {
67 base::DictionaryValue* bounds_value = new base::DictionaryValue();
68 bounds_value->SetInteger(keys::kLeft, bounds_.x());
69 bounds_value->SetInteger(keys::kTop, bounds_.y());
70 bounds_value->SetInteger(keys::kWidth, bounds_.width());
71 bounds_value->SetInteger(keys::kHeight, bounds_.height());
72 dict->Set(keys::kBoundsKey, bounds_value);
73 }
66 } 74 }
67 75
68 AccessibilityWindowInfo::AccessibilityWindowInfo(Profile* profile, 76 AccessibilityWindowInfo::AccessibilityWindowInfo(Profile* profile,
69 const std::string& window_name) 77 const std::string& window_name)
70 : AccessibilityControlInfo(profile, window_name) { 78 : AccessibilityControlInfo(profile, window_name) {
71 } 79 }
72 80
73 const char* AccessibilityWindowInfo::type() const { 81 const char* AccessibilityWindowInfo::type() const {
74 return keys::kTypeWindow; 82 return keys::kTypeWindow;
75 } 83 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 349 }
342 350
343 AccessibilityAlertInfo::AccessibilityAlertInfo(Profile* profile, 351 AccessibilityAlertInfo::AccessibilityAlertInfo(Profile* profile,
344 const std::string& name) 352 const std::string& name)
345 : AccessibilityControlInfo(profile, name) { 353 : AccessibilityControlInfo(profile, name) {
346 } 354 }
347 355
348 const char* AccessibilityAlertInfo::type() const { 356 const char* AccessibilityAlertInfo::type() const {
349 return keys::kTypeAlert; 357 return keys::kTypeAlert;
350 } 358 }
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/accessibility_events.h ('k') | chrome/browser/accessibility/accessibility_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698