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

Side by Side Diff: third_party/WebKit/Source/modules/nfc/NFC.cpp

Issue 2570463005: Retire ThreadState::registerPreFinalizer<T>() (Closed)
Patch Set: 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/nfc/NFC.h" 5 #include "modules/nfc/NFC.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "bindings/core/v8/V8ArrayBuffer.h" 8 #include "bindings/core/v8/V8ArrayBuffer.h"
9 #include "bindings/core/v8/V8StringResource.h" 9 #include "bindings/core/v8/V8StringResource.h"
10 #include "core/dom/DOMArrayBuffer.h" 10 #include "core/dom/DOMArrayBuffer.h"
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 } 567 }
568 return messageSize; 568 return messageSize;
569 } 569 }
570 570
571 } // namespace 571 } // namespace
572 572
573 NFC::NFC(LocalFrame* frame) 573 NFC::NFC(LocalFrame* frame)
574 : PageVisibilityObserver(frame->page()), 574 : PageVisibilityObserver(frame->page()),
575 ContextLifecycleObserver(frame->document()), 575 ContextLifecycleObserver(frame->document()),
576 m_client(this) { 576 m_client(this) {
577 ThreadState::current()->registerPreFinalizer(this);
578 frame->interfaceProvider()->getInterface(mojo::GetProxy(&m_nfc)); 577 frame->interfaceProvider()->getInterface(mojo::GetProxy(&m_nfc));
579 m_nfc.set_connection_error_handler(convertToBaseCallback( 578 m_nfc.set_connection_error_handler(convertToBaseCallback(
580 WTF::bind(&NFC::OnConnectionError, wrapWeakPersistent(this)))); 579 WTF::bind(&NFC::OnConnectionError, wrapWeakPersistent(this))));
581 m_nfc->SetClient(m_client.CreateInterfacePtrAndBind()); 580 m_nfc->SetClient(m_client.CreateInterfacePtrAndBind());
582 } 581 }
583 582
584 NFC* NFC::create(LocalFrame* frame) { 583 NFC* NFC::create(LocalFrame* frame) {
585 NFC* nfc = new NFC(frame); 584 NFC* nfc = new NFC(frame);
586 return nfc; 585 return nfc;
587 } 586 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 } 815 }
817 816
818 DEFINE_TRACE(NFC) { 817 DEFINE_TRACE(NFC) {
819 PageVisibilityObserver::trace(visitor); 818 PageVisibilityObserver::trace(visitor);
820 ContextLifecycleObserver::trace(visitor); 819 ContextLifecycleObserver::trace(visitor);
821 visitor->trace(m_requests); 820 visitor->trace(m_requests);
822 visitor->trace(m_callbacks); 821 visitor->trace(m_callbacks);
823 } 822 }
824 823
825 } // namespace blink 824 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698