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

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

Issue 26434002: Cleanup: Add more conversion helpers for usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to ToT. Patch for landing. Created 7 years, 2 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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 virtual const AtomicString& interfaceName() const; 56 virtual const AtomicString& interfaceName() const;
57 57
58 private: 58 private:
59 DeviceOrientationEvent(); 59 DeviceOrientationEvent();
60 DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientationData* ); 60 DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientationData* );
61 61
62 RefPtr<DeviceOrientationData> m_orientation; 62 RefPtr<DeviceOrientationData> m_orientation;
63 }; 63 };
64 64
65 inline DeviceOrientationEvent* toDeviceOrientationEvent(Event* event)
66 {
67 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->interfaceName() == EventNa mes::deviceorientation);
tkent 2013/10/10 01:51:13 EventNames::deviceorientation should be eventNames
68 return static_cast<DeviceOrientationEvent*>(event);
69 }
70
65 } // namespace WebCore 71 } // namespace WebCore
66 72
67 #endif // DeviceOrientationEvent_h 73 #endif // DeviceOrientationEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698