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 05798101923b3cd4bcd2a959a97e38bc27991edf..6e1a799e609d814b92de25c74dedc9e94b075446 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,14 @@ void ObserverDelegate::OnDeviceDataUpdate( |
} |
DeviceData* ObserverDelegate::EmptyDeviceData(DeviceData::Type type) { |
hans
2012/08/13 13:35:19
maybe a switch here would be better:
switch (type
aousterh
2012/08/16 15:23:49
Done.
|
- DCHECK(type == DeviceData::kTypeOrientation); |
- return new Orientation(); |
+ if (type == DeviceData::kTypeMotion) |
+ return new Motion(); |
+ else if (type == DeviceData::kTypeOrientation) |
+ return new Orientation(); |
+ else { |
+ NOTREACHED(); |
+ return NULL; |
+ } |
} |
} // namespace device_orientation |