| 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 #ifndef NFC_h | 5 #ifndef NFC_h |
| 6 #define NFC_h | 6 #define NFC_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "bindings/modules/v8/UnionTypesModules.h" | 10 #include "bindings/modules/v8/UnionTypesModules.h" |
| 11 #include "core/frame/LocalFrameLifecycleObserver.h" | 11 #include "core/frame/LocalFrameLifecycleObserver.h" |
| 12 #include "core/page/PageLifecycleObserver.h" | 12 #include "core/page/PageLifecycleObserver.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class MessageCallback; | 16 class MessageCallback; |
| 17 class NFCPushOptions; | 17 class NFCPushOptions; |
| 18 using NFCPushMessage = StringOrArrayBufferOrNFCMessage; | 18 using NFCPushMessage = StringOrArrayBufferOrNFCMessage; |
| 19 class NFCWatchOptions; | 19 class NFCWatchOptions; |
| 20 | 20 |
| 21 class NFC final | 21 class NFC final |
| 22 : public GarbageCollectedFinalized<NFC> | 22 : public GarbageCollectedFinalized<NFC> |
| 23 , public ScriptWrappable | 23 , public ScriptWrappable |
| 24 , public LocalFrameLifecycleObserver | 24 , public LocalFrameLifecycleObserver |
| 25 , public PageLifecycleObserver { | 25 , public PageLifecycleObserver { |
| 26 DEFINE_WRAPPERTYPEINFO(); | 26 DEFINE_WRAPPERTYPEINFO(); |
| 27 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NFC); | 27 USING_GARBAGE_COLLECTED_MIXIN(NFC); |
| 28 | 28 |
| 29 public: | 29 public: |
| 30 static NFC* create(LocalFrame*); | 30 static NFC* create(LocalFrame*); |
| 31 #if !ENABLE(OILPAN) | 31 #if !ENABLE(OILPAN) |
| 32 ~NFC() override = default; | 32 ~NFC() override = default; |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 // Pushes NFCPushMessage asynchronously to NFC tag / peer. | 35 // Pushes NFCPushMessage asynchronously to NFC tag / peer. |
| 36 ScriptPromise push(ScriptState*, const NFCPushMessage&, const NFCPushOptions
&); | 36 ScriptPromise push(ScriptState*, const NFCPushMessage&, const NFCPushOptions
&); |
| 37 | 37 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 56 // Interface required by garbage collection. | 56 // Interface required by garbage collection. |
| 57 DECLARE_VIRTUAL_TRACE(); | 57 DECLARE_VIRTUAL_TRACE(); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 NFC(LocalFrame*); | 60 NFC(LocalFrame*); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace blink | 63 } // namespace blink |
| 64 | 64 |
| 65 #endif // NFC_h | 65 #endif // NFC_h |
| OLD | NEW |