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 "core/frame/LocalFrameLifecycleObserver.h" | 10 #include "core/frame/LocalFrameLifecycleObserver.h" |
11 #include "core/page/PageLifecycleObserver.h" | 11 #include "core/page/PageLifecycleObserver.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class NFC final | 15 class NFC final |
16 : public GarbageCollectedFinalized<NFC> | 16 : public GarbageCollectedFinalized<NFC> |
17 , public ScriptWrappable | 17 , public ScriptWrappable |
18 , public LocalFrameLifecycleObserver | 18 , public LocalFrameLifecycleObserver |
19 , public PageLifecycleObserver { | 19 , public PageLifecycleObserver { |
20 DEFINE_WRAPPERTYPEINFO(); | 20 DEFINE_WRAPPERTYPEINFO(); |
21 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NFC); | 21 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NFC); |
22 | 22 |
23 public: | 23 public: |
24 static NFC* create(LocalFrame*); | 24 static NFC* create(LocalFrame*); |
| 25 #if ENABLE(OILPAN) |
| 26 ~NFC(); |
| 27 #else |
25 ~NFC() override; | 28 ~NFC() override; |
| 29 #endif |
26 | 30 |
27 // Get an adapter object providing NFC functionality. | 31 // Get an adapter object providing NFC functionality. |
28 ScriptPromise requestAdapter(ScriptState*); | 32 ScriptPromise requestAdapter(ScriptState*); |
29 | 33 |
30 // Implementation of LocalFrameLifecycleObserver. | 34 // Implementation of LocalFrameLifecycleObserver. |
31 void willDetachFrameHost() override; | 35 void willDetachFrameHost() override; |
32 | 36 |
33 // Implementation of PageLifecycleObserver | 37 // Implementation of PageLifecycleObserver |
34 void pageVisibilityChanged() override; | 38 void pageVisibilityChanged() override; |
35 | 39 |
36 // Interface required by garbage collection. | 40 // Interface required by garbage collection. |
37 DECLARE_VIRTUAL_TRACE(); | 41 DECLARE_VIRTUAL_TRACE(); |
38 | 42 |
39 private: | 43 private: |
40 NFC(LocalFrame*); | 44 NFC(LocalFrame*); |
41 }; | 45 }; |
42 | 46 |
43 } // namespace blink | 47 } // namespace blink |
44 | 48 |
45 #endif // NFC_h | 49 #endif // NFC_h |
OLD | NEW |