OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ResizeObserver_h |
| 6 #define ResizeObserver_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class Document; |
| 14 class Element; |
| 15 class ResizeObserverCallback; |
| 16 class ResizeObserverEntry; |
| 17 |
| 18 // ResizeObserver represents ResizeObserver javascript api: |
| 19 // https://github.com/WICG/ResizeObserver/ |
| 20 class ResizeObserver final : public GarbageCollectedFinalized<ResizeObserver>, p
ublic ScriptWrappable { |
| 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 public: |
| 23 |
| 24 static ResizeObserver* create(Document&, ResizeObserverCallback*); |
| 25 |
| 26 virtual ~ResizeObserver() {}; |
| 27 |
| 28 |
| 29 // API methods |
| 30 void observe(Element*); |
| 31 void unobserve(Element*); |
| 32 void disconnect(); |
| 33 |
| 34 DECLARE_TRACE(); |
| 35 |
| 36 private: |
| 37 |
| 38 explicit ResizeObserver(ResizeObserverCallback*, Document&); |
| 39 |
| 40 }; |
| 41 |
| 42 |
| 43 } // namespace blink |
| 44 |
| 45 #endif // ResizeObserver_h |
OLD | NEW |