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

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

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CORE_EXPORT Created 5 years, 1 month 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type , bool bubbles, bool cancelable, const Nullable<double>& alpha, const Nullable<d ouble>& beta, const Nullable<double>& gamma, const Nullable<bool>& absolute) 48 void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type , bool bubbles, bool cancelable, const Nullable<double>& alpha, const Nullable<d ouble>& beta, const Nullable<double>& gamma, const Nullable<bool>& absolute)
49 { 49 {
50 if (dispatched()) 50 if (dispatched())
51 return; 51 return;
52 52
53 initEvent(type, bubbles, cancelable); 53 initEvent(type, bubbles, cancelable);
54 m_orientation = DeviceOrientationData::create(alpha, beta, gamma, absolute); 54 m_orientation = DeviceOrientationData::create(alpha, beta, gamma, absolute);
55 } 55 }
56 56
57 DeviceOrientationData* DeviceOrientationEvent::orientation() const
58 {
59 return m_orientation.get();
60 }
61
57 double DeviceOrientationEvent::alpha(bool& isNull) const 62 double DeviceOrientationEvent::alpha(bool& isNull) const
58 { 63 {
59 if (m_orientation->canProvideAlpha()) 64 if (m_orientation->canProvideAlpha())
60 return m_orientation->alpha(); 65 return m_orientation->alpha();
61 66
62 isNull = true; 67 isNull = true;
63 return 0; 68 return 0;
64 } 69 }
65 70
66 double DeviceOrientationEvent::beta(bool& isNull) const 71 double DeviceOrientationEvent::beta(bool& isNull) const
(...skipping 28 matching lines...) Expand all
95 return EventNames::DeviceOrientationEvent; 100 return EventNames::DeviceOrientationEvent;
96 } 101 }
97 102
98 DEFINE_TRACE(DeviceOrientationEvent) 103 DEFINE_TRACE(DeviceOrientationEvent)
99 { 104 {
100 visitor->trace(m_orientation); 105 visitor->trace(m_orientation);
101 Event::trace(visitor); 106 Event::trace(visitor);
102 } 107 }
103 108
104 } // namespace blink 109 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698