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

Side by Side Diff: Source/modules/vibration/NavigatorVibration.cpp

Issue 255983003: Oilpan: Move all supplements of Page, Document, and WorkerClients to the managed heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: using namespace WebCore Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Samsung Electronics 2 * Copyright (C) 2012 Samsung Electronics
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 return false; 150 return false;
151 151
152 if (page->visibilityState() != PageVisibilityStateVisible) 152 if (page->visibilityState() != PageVisibilityStateVisible)
153 return false; 153 return false;
154 154
155 return NavigatorVibration::from(*page).vibrate(pattern); 155 return NavigatorVibration::from(*page).vibrate(pattern);
156 } 156 }
157 157
158 NavigatorVibration& NavigatorVibration::from(Page& page) 158 NavigatorVibration& NavigatorVibration::from(Page& page)
159 { 159 {
160 NavigatorVibration* navigatorVibration = static_cast<NavigatorVibration*>(Su pplement<Page>::from(page, supplementName())); 160 NavigatorVibration* navigatorVibration = static_cast<NavigatorVibration*>(Wi llBeHeapSupplement<Page>::from(page, supplementName()));
161 if (!navigatorVibration) { 161 if (!navigatorVibration) {
162 navigatorVibration = new NavigatorVibration(page); 162 navigatorVibration = new NavigatorVibration(page);
163 Supplement<Page>::provideTo(page, supplementName(), adoptPtr(navigatorVi bration)); 163 WillBeHeapSupplement<Page>::provideTo(page, supplementName(), adoptPtrWi llBeNoop(navigatorVibration));
164 } 164 }
165 return *navigatorVibration; 165 return *navigatorVibration;
166 } 166 }
167 167
168 const char* NavigatorVibration::supplementName() 168 const char* NavigatorVibration::supplementName()
169 { 169 {
170 return "NavigatorVibration"; 170 return "NavigatorVibration";
171 } 171 }
172 172
173 } // namespace WebCore 173 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/vibration/NavigatorVibration.h ('k') | Source/modules/webdatabase/DatabaseClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698