Index: content/browser/device_orientation/observer_delegate.cc |
diff --git a/content/browser/device_orientation/observer_delegate.cc b/content/browser/device_orientation/observer_delegate.cc |
index 6598f0ff03d3556ab506ffbae42d1ec17ffeff6a..1ffe07a7745489a9a729c0d5df094a5c044ec0af 100644 |
--- a/content/browser/device_orientation/observer_delegate.cc |
+++ b/content/browser/device_orientation/observer_delegate.cc |
@@ -6,6 +6,7 @@ |
#include "base/logging.h" |
#include "content/browser/device_orientation/device_data.h" |
+#include "content/browser/device_orientation/motion.h" |
#include "content/browser/device_orientation/orientation.h" |
#include "ipc/ipc_sender.h" |
@@ -35,8 +36,16 @@ void ObserverDelegate::OnDeviceDataUpdate( |
} |
DeviceData* ObserverDelegate::EmptyDeviceData(DeviceData::Type type) { |
- DCHECK(type == DeviceData::kTypeOrientation); |
- return new Orientation(); |
+ switch (type) { |
+ case DeviceData::kTypeMotion: |
+ return new Motion(); |
+ case DeviceData::kTypeOrientation: |
+ return new Orientation(); |
+ case DeviceData::kTypeTest: |
+ NOTREACHED(); |
+ } |
+ NOTREACHED(); |
+ return NULL; |
} |
} // namespace content |