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

Side by Side Diff: third_party/WebKit/Source/core/dom/AXObjectCache.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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 /* 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 DCHECK(m_createFunction); 45 DCHECK(m_createFunction);
46 return m_createFunction(document); 46 return m_createFunction(document);
47 } 47 }
48 48
49 AXObjectCache::AXObjectCache() {} 49 AXObjectCache::AXObjectCache() {}
50 50
51 AXObjectCache::~AXObjectCache() {} 51 AXObjectCache::~AXObjectCache() {}
52 52
53 std::unique_ptr<ScopedAXObjectCache> ScopedAXObjectCache::create( 53 std::unique_ptr<ScopedAXObjectCache> ScopedAXObjectCache::create(
54 Document& document) { 54 Document& document) {
55 return wrapUnique(new ScopedAXObjectCache(document)); 55 return WTF::wrapUnique(new ScopedAXObjectCache(document));
56 } 56 }
57 57
58 ScopedAXObjectCache::ScopedAXObjectCache(Document& document) 58 ScopedAXObjectCache::ScopedAXObjectCache(Document& document)
59 : m_document(&document) { 59 : m_document(&document) {
60 if (!m_document->axObjectCache()) 60 if (!m_document->axObjectCache())
61 m_cache = AXObjectCache::create(*m_document); 61 m_cache = AXObjectCache::create(*m_document);
62 } 62 }
63 63
64 ScopedAXObjectCache::~ScopedAXObjectCache() { 64 ScopedAXObjectCache::~ScopedAXObjectCache() {
65 if (m_cache) 65 if (m_cache)
66 m_cache->dispose(); 66 m_cache->dispose();
67 } 67 }
68 68
69 AXObjectCache* ScopedAXObjectCache::get() { 69 AXObjectCache* ScopedAXObjectCache::get() {
70 if (m_cache) 70 if (m_cache)
71 return m_cache.get(); 71 return m_cache.get();
72 AXObjectCache* cache = m_document->axObjectCache(); 72 AXObjectCache* cache = m_document->axObjectCache();
73 DCHECK(cache); 73 DCHECK(cache);
74 return cache; 74 return cache;
75 } 75 }
76 76
77 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698