| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 #include "core/dom/DOMException.h" | 28 #include "core/dom/DOMException.h" |
| 29 #include "wtf/PtrUtil.h" | 29 #include "wtf/PtrUtil.h" |
| 30 #include <memory> | 30 #include <memory> |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 std::unique_ptr<WebIDBDatabaseCallbacksImpl> | 35 std::unique_ptr<WebIDBDatabaseCallbacksImpl> |
| 36 WebIDBDatabaseCallbacksImpl::create(IDBDatabaseCallbacks* callbacks) { | 36 WebIDBDatabaseCallbacksImpl::create(IDBDatabaseCallbacks* callbacks) { |
| 37 return wrapUnique(new WebIDBDatabaseCallbacksImpl(callbacks)); | 37 return WTF::wrapUnique(new WebIDBDatabaseCallbacksImpl(callbacks)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 WebIDBDatabaseCallbacksImpl::WebIDBDatabaseCallbacksImpl( | 40 WebIDBDatabaseCallbacksImpl::WebIDBDatabaseCallbacksImpl( |
| 41 IDBDatabaseCallbacks* callbacks) | 41 IDBDatabaseCallbacks* callbacks) |
| 42 : m_callbacks(callbacks) {} | 42 : m_callbacks(callbacks) {} |
| 43 | 43 |
| 44 WebIDBDatabaseCallbacksImpl::~WebIDBDatabaseCallbacksImpl() { | 44 WebIDBDatabaseCallbacksImpl::~WebIDBDatabaseCallbacksImpl() { |
| 45 if (m_callbacks) | 45 if (m_callbacks) |
| 46 m_callbacks->webCallbacksDestroyed(); | 46 m_callbacks->webCallbacksDestroyed(); |
| 47 } | 47 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 76 const WebVector<WebIDBObservation>& observations) { | 76 const WebVector<WebIDBObservation>& observations) { |
| 77 if (m_callbacks) | 77 if (m_callbacks) |
| 78 m_callbacks->onChanges(observation_index_map, observations); | 78 m_callbacks->onChanges(observation_index_map, observations); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void WebIDBDatabaseCallbacksImpl::detach() { | 81 void WebIDBDatabaseCallbacksImpl::detach() { |
| 82 m_callbacks.clear(); | 82 m_callbacks.clear(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 } // namespace blink | 85 } // namespace blink |
| OLD | NEW |