OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 | 29 |
30 #ifndef Screen_h | 30 #ifndef Screen_h |
31 #define Screen_h | 31 #define Screen_h |
32 | 32 |
33 #include "bindings/v8/ScriptWrappable.h" | 33 #include "bindings/v8/ScriptWrappable.h" |
| 34 #include "core/events/EventTarget.h" |
34 #include "core/frame/DOMWindowProperty.h" | 35 #include "core/frame/DOMWindowProperty.h" |
| 36 #include "platform/Supplementable.h" |
35 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
36 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
37 | 39 |
38 namespace WebCore { | 40 namespace WebCore { |
39 | 41 |
40 class Frame; | 42 class Frame; |
41 | 43 |
42 class Screen FINAL : public ScriptWrappable, public RefCounted<Screen>, publ
ic DOMWindowProperty { | 44 class Screen FINAL : public ScriptWrappable, public RefCounted<Screen>, publ
ic EventTargetWithInlineData, public DOMWindowProperty, public Supplementable<Sc
reen> { |
| 45 REFCOUNTED_EVENT_TARGET(Screen); |
43 public: | 46 public: |
44 static PassRefPtr<Screen> create(Frame *frame) { return adoptRef(new Scr
een(frame)); } | 47 static PassRefPtr<Screen> create(Frame *frame) { return adoptRef(new Scr
een(frame)); } |
45 | 48 |
46 unsigned height() const; | 49 unsigned height() const; |
47 unsigned width() const; | 50 unsigned width() const; |
48 unsigned colorDepth() const; | 51 unsigned colorDepth() const; |
49 unsigned pixelDepth() const; | 52 unsigned pixelDepth() const; |
50 int availLeft() const; | 53 int availLeft() const; |
51 int availTop() const; | 54 int availTop() const; |
52 unsigned availHeight() const; | 55 unsigned availHeight() const; |
53 unsigned availWidth() const; | 56 unsigned availWidth() const; |
54 | 57 |
| 58 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 59 virtual ExecutionContext* executionContext() const OVERRIDE; |
| 60 |
55 private: | 61 private: |
56 explicit Screen(Frame*); | 62 explicit Screen(Frame*); |
57 }; | 63 }; |
58 | 64 |
59 } // namespace WebCore | 65 } // namespace WebCore |
60 | 66 |
61 #endif // Screen_h | 67 #endif // Screen_h |
OLD | NEW |