OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, Google Inc. All rights reserved. |
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 are met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 NavigatorGamepad::NavigatorGamepad(LocalFrame* frame) | 175 NavigatorGamepad::NavigatorGamepad(LocalFrame* frame) |
176 : DOMWindowProperty(frame) | 176 : DOMWindowProperty(frame) |
177 , PlatformEventController(frame ? frame->page() : 0) | 177 , PlatformEventController(frame ? frame->page() : 0) |
178 , DOMWindowLifecycleObserver(frame ? frame->domWindow() : 0) | 178 , DOMWindowLifecycleObserver(frame ? frame->domWindow() : 0) |
179 , m_dispatchOneEventRunner(this, &NavigatorGamepad::dispatchOneEvent) | 179 , m_dispatchOneEventRunner(this, &NavigatorGamepad::dispatchOneEvent) |
180 { | 180 { |
181 } | 181 } |
182 | 182 |
183 NavigatorGamepad::~NavigatorGamepad() | 183 NavigatorGamepad::~NavigatorGamepad() |
184 { | 184 { |
185 #if ENABLE(OILPAN) | |
186 stopUpdating(); | |
187 #endif | |
188 } | 185 } |
189 | 186 |
190 const char* NavigatorGamepad::supplementName() | 187 const char* NavigatorGamepad::supplementName() |
191 { | 188 { |
192 return "NavigatorGamepad"; | 189 return "NavigatorGamepad"; |
193 } | 190 } |
194 | 191 |
195 void NavigatorGamepad::willDestroyGlobalObjectInFrame() | 192 void NavigatorGamepad::willDestroyGlobalObjectInFrame() |
196 { | 193 { |
197 stopUpdating(); | 194 stopUpdating(); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 if (connectedGamepadChanged || (!oldWasConnected && newIsConnected)) { | 286 if (connectedGamepadChanged || (!oldWasConnected && newIsConnected)) { |
290 m_pendingEvents.append(newGamepad); | 287 m_pendingEvents.append(newGamepad); |
291 } | 288 } |
292 } | 289 } |
293 | 290 |
294 if (!m_pendingEvents.isEmpty()) | 291 if (!m_pendingEvents.isEmpty()) |
295 m_dispatchOneEventRunner.runAsync(); | 292 m_dispatchOneEventRunner.runAsync(); |
296 } | 293 } |
297 | 294 |
298 } // namespace blink | 295 } // namespace blink |
OLD | NEW |