| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "core/dom/AXObjectCache.h" | 29 #include "core/dom/AXObjectCache.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 AXObjectCache::AXObjectCacheCreateFunction AXObjectCache::m_createFunction = nul
lptr; | 33 AXObjectCache::AXObjectCacheCreateFunction AXObjectCache::m_createFunction = nul
lptr; |
| 34 | 34 |
| 35 void AXObjectCache::init(AXObjectCacheCreateFunction function) | 35 void AXObjectCache::init(AXObjectCacheCreateFunction function) |
| 36 { | 36 { |
| 37 ASSERT(!m_createFunction); | 37 DCHECK(!m_createFunction); |
| 38 m_createFunction = function; | 38 m_createFunction = function; |
| 39 } | 39 } |
| 40 | 40 |
| 41 AXObjectCache* AXObjectCache::create(Document& document) | 41 AXObjectCache* AXObjectCache::create(Document& document) |
| 42 { | 42 { |
| 43 ASSERT(m_createFunction); | 43 DCHECK(m_createFunction); |
| 44 return m_createFunction(document); | 44 return m_createFunction(document); |
| 45 } | 45 } |
| 46 | 46 |
| 47 AXObjectCache::AXObjectCache() | 47 AXObjectCache::AXObjectCache() |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 AXObjectCache::~AXObjectCache() | 51 AXObjectCache::~AXObjectCache() |
| 52 { | 52 { |
| 53 } | 53 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 68 { | 68 { |
| 69 if (m_cache) | 69 if (m_cache) |
| 70 m_cache->dispose(); | 70 m_cache->dispose(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 AXObjectCache* ScopedAXObjectCache::get() | 73 AXObjectCache* ScopedAXObjectCache::get() |
| 74 { | 74 { |
| 75 if (m_cache) | 75 if (m_cache) |
| 76 return m_cache.get(); | 76 return m_cache.get(); |
| 77 AXObjectCache* cache = m_document->axObjectCache(); | 77 AXObjectCache* cache = m_document->axObjectCache(); |
| 78 ASSERT(cache); | 78 DCHECK(cache); |
| 79 return cache; | 79 return cache; |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| OLD | NEW |