| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/renderer_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 return new DeviceOrientationEventPump(thread); | 1086 return new DeviceOrientationEventPump(thread); |
| 1087 case blink::WebPlatformEventDeviceLight: | 1087 case blink::WebPlatformEventDeviceLight: |
| 1088 return new DeviceLightEventPump(thread); | 1088 return new DeviceLightEventPump(thread); |
| 1089 case blink::WebPlatformEventGamepad: | 1089 case blink::WebPlatformEventGamepad: |
| 1090 return new GamepadSharedMemoryReader(thread); | 1090 return new GamepadSharedMemoryReader(thread); |
| 1091 case blink::WebPlatformEventScreenOrientation: | 1091 case blink::WebPlatformEventScreenOrientation: |
| 1092 return new ScreenOrientationObserver(); | 1092 return new ScreenOrientationObserver(); |
| 1093 default: | 1093 default: |
| 1094 // A default statement is required to prevent compilation errors when | 1094 // A default statement is required to prevent compilation errors when |
| 1095 // Blink adds a new type. | 1095 // Blink adds a new type. |
| 1096 VLOG(1) << "RendererBlinkPlatformImpl::startListening() with " | 1096 DVLOG(1) << "RendererBlinkPlatformImpl::startListening() with " |
| 1097 "unknown type."; | 1097 "unknown type."; |
| 1098 } | 1098 } |
| 1099 | 1099 |
| 1100 return NULL; | 1100 return NULL; |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 void RendererBlinkPlatformImpl::SetPlatformEventObserverForTesting( | 1103 void RendererBlinkPlatformImpl::SetPlatformEventObserverForTesting( |
| 1104 blink::WebPlatformEventType type, | 1104 blink::WebPlatformEventType type, |
| 1105 scoped_ptr<PlatformEventObserverBase> observer) { | 1105 scoped_ptr<PlatformEventObserverBase> observer) { |
| 1106 DCHECK(type != blink::WebPlatformEventBattery); | 1106 DCHECK(type != blink::WebPlatformEventBattery); |
| 1107 | 1107 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 //------------------------------------------------------------------------------ | 1220 //------------------------------------------------------------------------------ |
| 1221 | 1221 |
| 1222 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1222 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
| 1223 const blink::WebBatteryStatus& status) { | 1223 const blink::WebBatteryStatus& status) { |
| 1224 if (!g_test_battery_status_listener) | 1224 if (!g_test_battery_status_listener) |
| 1225 return; | 1225 return; |
| 1226 g_test_battery_status_listener->updateBatteryStatus(status); | 1226 g_test_battery_status_listener->updateBatteryStatus(status); |
| 1227 } | 1227 } |
| 1228 | 1228 |
| 1229 } // namespace content | 1229 } // namespace content |
| OLD | NEW |