OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010, The Android Open Source Project | 2 * Copyright 2010, The Android Open Source Project |
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 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * * Redistributions in binary form must reproduce the above copyright | 9 * * Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 namespace WebCore { | 32 namespace WebCore { |
33 | 33 |
34 DeviceOrientationEvent::~DeviceOrientationEvent() | 34 DeviceOrientationEvent::~DeviceOrientationEvent() |
35 { | 35 { |
36 } | 36 } |
37 | 37 |
38 DeviceOrientationEvent::DeviceOrientationEvent() | 38 DeviceOrientationEvent::DeviceOrientationEvent() |
39 : m_orientation(DeviceOrientationData::create()) | 39 : m_orientation(DeviceOrientationData::create()) |
40 { | 40 { |
| 41 ScriptWrappable::init(this); |
41 } | 42 } |
42 | 43 |
43 DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, De
viceOrientationData* orientation) | 44 DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, De
viceOrientationData* orientation) |
44 : Event(eventType, false, false) // Can't bubble, not cancelable | 45 : Event(eventType, false, false) // Can't bubble, not cancelable |
45 , m_orientation(orientation) | 46 , m_orientation(orientation) |
46 { | 47 { |
| 48 ScriptWrappable::init(this); |
47 } | 49 } |
48 | 50 |
49 void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type
, bool bubbles, bool cancelable, DeviceOrientationData* orientation) | 51 void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type
, bool bubbles, bool cancelable, DeviceOrientationData* orientation) |
50 { | 52 { |
51 if (dispatched()) | 53 if (dispatched()) |
52 return; | 54 return; |
53 | 55 |
54 initEvent(type, bubbles, cancelable); | 56 initEvent(type, bubbles, cancelable); |
55 m_orientation = orientation; | 57 m_orientation = orientation; |
56 } | 58 } |
57 | 59 |
58 const AtomicString& DeviceOrientationEvent::interfaceName() const | 60 const AtomicString& DeviceOrientationEvent::interfaceName() const |
59 { | 61 { |
60 return eventNames().interfaceForDeviceOrientationEvent; | 62 return eventNames().interfaceForDeviceOrientationEvent; |
61 } | 63 } |
62 | 64 |
63 } // namespace WebCore | 65 } // namespace WebCore |
OLD | NEW |