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

Side by Side Diff: Source/modules/gamepad/NavigatorGamepad.cpp

Issue 619383002: Move PlatformEventDispatcher implementations to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix non-Oilpan allocation of DeviceLightDispatcher singleton Created 6 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 (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
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
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
OLDNEW
« no previous file with comments | « Source/modules/gamepad/GamepadDispatcher.cpp ('k') | Source/modules/screen_orientation/ScreenOrientationDispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698