Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: Source/modules/device_orientation/DeviceOrientationEvent.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 30
31 namespace blink { 31 namespace blink {
32 32
33 DeviceOrientationEvent::~DeviceOrientationEvent() 33 DeviceOrientationEvent::~DeviceOrientationEvent()
34 { 34 {
35 } 35 }
36 36
37 DeviceOrientationEvent::DeviceOrientationEvent() 37 DeviceOrientationEvent::DeviceOrientationEvent()
38 : m_orientation(DeviceOrientationData::create()) 38 : m_orientation(DeviceOrientationData::create())
39 { 39 {
40 ScriptWrappable::init(this);
41 } 40 }
42 41
43 DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, De viceOrientationData* orientation) 42 DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, De viceOrientationData* orientation)
44 : Event(eventType, false, false) // Can't bubble, not cancelable 43 : Event(eventType, false, false) // Can't bubble, not cancelable
45 , m_orientation(orientation) 44 , m_orientation(orientation)
46 { 45 {
47 ScriptWrappable::init(this);
48 } 46 }
49 47
50 void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type , bool bubbles, bool cancelable, DeviceOrientationData* orientation) 48 void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type , bool bubbles, bool cancelable, DeviceOrientationData* orientation)
51 { 49 {
52 if (dispatched()) 50 if (dispatched())
53 return; 51 return;
54 52
55 initEvent(type, bubbles, cancelable); 53 initEvent(type, bubbles, cancelable);
56 m_orientation = orientation; 54 m_orientation = orientation;
57 } 55 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return EventNames::DeviceOrientationEvent; 95 return EventNames::DeviceOrientationEvent;
98 } 96 }
99 97
100 void DeviceOrientationEvent::trace(Visitor* visitor) 98 void DeviceOrientationEvent::trace(Visitor* visitor)
101 { 99 {
102 visitor->trace(m_orientation); 100 visitor->trace(m_orientation);
103 Event::trace(visitor); 101 Event::trace(visitor);
104 } 102 }
105 103
106 } // namespace blink 104 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/device_orientation/DeviceMotionEvent.cpp ('k') | Source/modules/device_orientation/DeviceRotationRate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698