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

Side by Side Diff: content/browser/accessibility/browser_accessibility_gtk.cc

Issue 21269002: Make AccessibilityNodeData more compact. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile Created 7 years, 4 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 | Annotate | Revision Log
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 "content/browser/accessibility/browser_accessibility_gtk.h" 5 #include "content/browser/accessibility/browser_accessibility_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/accessibility/browser_accessibility_manager_gtk.h" 10 #include "content/browser/accessibility/browser_accessibility_manager_gtk.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 atk_object_, 326 atk_object_,
327 this->parent()->ToBrowserAccessibilityGtk()->GetAtkObject()); 327 this->parent()->ToBrowserAccessibilityGtk()->GetAtkObject());
328 } 328 }
329 } 329 }
330 330
331 bool BrowserAccessibilityGtk::IsNative() const { 331 bool BrowserAccessibilityGtk::IsNative() const {
332 return true; 332 return true;
333 } 333 }
334 334
335 void BrowserAccessibilityGtk::InitRoleAndState() { 335 void BrowserAccessibilityGtk::InitRoleAndState() {
336 atk_acc_name_ = UTF16ToUTF8(name()); 336 atk_acc_name_ = name();
337 337
338 string16 description; 338 string16 description;
339 GetStringAttribute(AccessibilityNodeData::ATTR_DESCRIPTION, &description); 339 GetStringAttribute(AccessibilityNodeData::ATTR_DESCRIPTION, &description);
340 atk_acc_description_ = UTF16ToUTF8(description); 340 atk_acc_description_ = UTF16ToUTF8(description);
341 341
342 switch(role_) { 342 switch(role_) {
343 case AccessibilityNodeData::ROLE_DOCUMENT: 343 case AccessibilityNodeData::ROLE_DOCUMENT:
344 case AccessibilityNodeData::ROLE_ROOT_WEB_AREA: 344 case AccessibilityNodeData::ROLE_ROOT_WEB_AREA:
345 case AccessibilityNodeData::ROLE_WEB_AREA: 345 case AccessibilityNodeData::ROLE_WEB_AREA:
346 atk_role_ = ATK_ROLE_DOCUMENT_WEB; 346 atk_role_ = ATK_ROLE_DOCUMENT_WEB;
(...skipping 29 matching lines...) Expand all
376 case AccessibilityNodeData::ROLE_WEBCORE_LINK: 376 case AccessibilityNodeData::ROLE_WEBCORE_LINK:
377 atk_role_ = ATK_ROLE_LINK; 377 atk_role_ = ATK_ROLE_LINK;
378 break; 378 break;
379 default: 379 default:
380 atk_role_ = ATK_ROLE_UNKNOWN; 380 atk_role_ = ATK_ROLE_UNKNOWN;
381 break; 381 break;
382 } 382 }
383 } 383 }
384 384
385 } // namespace content 385 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698