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

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

Issue 1081673003: Oilpan: Prepare to move AXObjectCache to the heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 "config.h" 5 #include "config.h"
6 6
7 #include "modules/accessibility/InspectorAccessibilityAgent.h" 7 #include "modules/accessibility/InspectorAccessibilityAgent.h"
8 8
9 #include "core/dom/AXObjectCache.h" 9 #include "core/dom/AXObjectCache.h"
10 #include "core/dom/DOMNodeIds.h" 10 #include "core/dom/DOMNodeIds.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 InspectorDOMAgent* domAgent = toLocalFrame(mainFrame)->instrumentingAgents() ->inspectorDOMAgent(); 419 InspectorDOMAgent* domAgent = toLocalFrame(mainFrame)->instrumentingAgents() ->inspectorDOMAgent();
420 if (!domAgent) { 420 if (!domAgent) {
421 *errorString = "DOM agent must be enabled"; 421 *errorString = "DOM agent must be enabled";
422 return; 422 return;
423 } 423 }
424 Node* node = domAgent->assertNode(errorString, nodeId); 424 Node* node = domAgent->assertNode(errorString, nodeId);
425 if (!node) 425 if (!node)
426 return; 426 return;
427 Document& document = node->document(); 427 Document& document = node->document();
428 #if ENABLE(OILPAN)
haraken 2015/04/28 10:45:21 Would you elaborate on why we need a different log
428 if (!document.axObjectCache()) 429 if (!document.axObjectCache())
429 return; 430 return;
430 ScopedAXObjectCache cache(document); 431 ScopedAXObjectCache cache(document);
431 AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(cache.get()); 432 AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(cache.get());
433 #else
434 AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(document.axObjectCache()) ;
435 if (!cacheImpl)
436 return;
437 #endif
432 AXObject* axObject = cacheImpl->getOrCreate(node); 438 AXObject* axObject = cacheImpl->getOrCreate(node);
433 if (!axObject) 439 if (!axObject)
434 return; 440 return;
435 441
436 RefPtr<TypeBuilder::Array<AXProperty>> properties = TypeBuilder::Array<AXPro perty>::create(); 442 RefPtr<TypeBuilder::Array<AXProperty>> properties = TypeBuilder::Array<AXPro perty>::create();
437 fillLiveRegionProperties(axObject, properties); 443 fillLiveRegionProperties(axObject, properties);
438 fillGlobalStates(axObject, properties); 444 fillGlobalStates(axObject, properties);
439 fillWidgetProperties(axObject, properties); 445 fillWidgetProperties(axObject, properties);
440 fillWidgetStates(axObject, properties); 446 fillWidgetStates(axObject, properties);
441 fillRelationships(axObject, properties); 447 fillRelationships(axObject, properties);
442 448
443 accessibilityNode = buildObjectForNode(node, axObject, cacheImpl, properties ); 449 accessibilityNode = buildObjectForNode(node, axObject, cacheImpl, properties );
444 } 450 }
445 451
446 DEFINE_TRACE(InspectorAccessibilityAgent) 452 DEFINE_TRACE(InspectorAccessibilityAgent)
447 { 453 {
448 visitor->trace(m_page); 454 visitor->trace(m_page);
449 InspectorBaseAgent::trace(visitor); 455 InspectorBaseAgent::trace(visitor);
450 } 456 }
451 457
452 } // namespace blink 458 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698