| OLD | NEW |
| 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/JSONValuesForV8.h" | 7 #include "bindings/core/v8/JSONValuesForV8.h" |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/V8ArrayBuffer.h" | 9 #include "bindings/core/v8/V8ArrayBuffer.h" |
| 10 #include "core/dom/DOMArrayBuffer.h" | 10 #include "core/dom/DOMArrayBuffer.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 | 437 |
| 438 } // anonymous namespace | 438 } // anonymous namespace |
| 439 | 439 |
| 440 NFC::NFC(LocalFrame* frame) | 440 NFC::NFC(LocalFrame* frame) |
| 441 : PageLifecycleObserver(frame->page()) | 441 : PageLifecycleObserver(frame->page()) |
| 442 , ContextLifecycleObserver(frame->document()) | 442 , ContextLifecycleObserver(frame->document()) |
| 443 , m_client(this) | 443 , m_client(this) |
| 444 { | 444 { |
| 445 ThreadState::current()->registerPreFinalizer(this); | 445 ThreadState::current()->registerPreFinalizer(this); |
| 446 frame->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_nfc)); | 446 frame->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_nfc)); |
| 447 m_nfc.set_connection_error_handler(createBaseCallback(bind(&NFC::OnConnectio
nError, WeakPersistentThisPointer<NFC>(this)))); | 447 m_nfc.set_connection_error_handler(createBaseCallback(bind(&NFC::OnConnectio
nError, wrapWeakPersistent(this)))); |
| 448 m_nfc->SetClient(m_client.CreateInterfacePtrAndBind()); | 448 m_nfc->SetClient(m_client.CreateInterfacePtrAndBind()); |
| 449 } | 449 } |
| 450 | 450 |
| 451 NFC* NFC::create(LocalFrame* frame) | 451 NFC* NFC::create(LocalFrame* frame) |
| 452 { | 452 { |
| 453 NFC* nfc = new NFC(frame); | 453 NFC* nfc = new NFC(frame); |
| 454 return nfc; | 454 return nfc; |
| 455 } | 455 } |
| 456 | 456 |
| 457 NFC::~NFC() | 457 NFC::~NFC() |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 } | 580 } |
| 581 | 581 |
| 582 DEFINE_TRACE(NFC) | 582 DEFINE_TRACE(NFC) |
| 583 { | 583 { |
| 584 PageLifecycleObserver::trace(visitor); | 584 PageLifecycleObserver::trace(visitor); |
| 585 ContextLifecycleObserver::trace(visitor); | 585 ContextLifecycleObserver::trace(visitor); |
| 586 visitor->trace(m_requests); | 586 visitor->trace(m_requests); |
| 587 } | 587 } |
| 588 | 588 |
| 589 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |