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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp

Issue 1745423002: DevTools: migrate protocol values from RefPtr to OwnPtr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/accessibility/InspectorAccessibilityAgent.h" 5 #include "modules/accessibility/InspectorAccessibilityAgent.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/dom/AXObjectCache.h" 8 #include "core/dom/AXObjectCache.h"
9 #include "core/dom/DOMNodeIds.h" 9 #include "core/dom/DOMNodeIds.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXRelate dObjectVector& nodes) 249 PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXRelate dObjectVector& nodes)
250 { 250 {
251 OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes, AXValueTyp eEnum::NodeList); 251 OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes, AXValueTyp eEnum::NodeList);
252 return createProperty(key, nodeListValue.release()); 252 return createProperty(key, nodeListValue.release());
253 } 253 }
254 254
255 PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXObject ::AXObjectVector& nodes, const QualifiedName& attr, AXObject* axObject) 255 PassOwnPtr<AXProperty> createRelatedNodeListProperty(const String& key, AXObject ::AXObjectVector& nodes, const QualifiedName& attr, AXObject* axObject)
256 { 256 {
257 OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes); 257 OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes);
258 const AtomicString& attrValue = axObject->getAttribute(attr); 258 const AtomicString& attrValue = axObject->getAttribute(attr);
259 nodeListValue->setValue(protocol::StringValue::create(attrValue).get()); 259 nodeListValue->setValue(protocol::StringValue::create(attrValue));
260 return createProperty(key, nodeListValue.release()); 260 return createProperty(key, nodeListValue.release());
261 } 261 }
262 262
263 void fillRelationships(AXObject* axObject, protocol::Array<AXProperty>* properti es) 263 void fillRelationships(AXObject* axObject, protocol::Array<AXProperty>* properti es)
264 { 264 {
265 if (AXObject* activeDescendant = axObject->activeDescendant()) { 265 if (AXObject* activeDescendant = axObject->activeDescendant()) {
266 properties->addItem(createProperty(AXRelationshipAttributesEnum::Actived escendant, createRelatedNodeListValue(activeDescendant))); 266 properties->addItem(createProperty(AXRelationshipAttributesEnum::Actived escendant, createRelatedNodeListValue(activeDescendant)));
267 } 267 }
268 268
269 AXObject::AXObjectVector results; 269 AXObject::AXObjectVector results;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 *accessibilityNode = buildObjectForNode(node, axObject, cacheImpl, propertie s.release()); 400 *accessibilityNode = buildObjectForNode(node, axObject, cacheImpl, propertie s.release());
401 } 401 }
402 402
403 DEFINE_TRACE(InspectorAccessibilityAgent) 403 DEFINE_TRACE(InspectorAccessibilityAgent)
404 { 404 {
405 visitor->trace(m_page); 405 visitor->trace(m_page);
406 InspectorBaseAgent::trace(visitor); 406 InspectorBaseAgent::trace(visitor);
407 } 407 }
408 408
409 } // namespace blink 409 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698