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

Side by Side Diff: third_party/WebKit/Source/modules/vibration/VibrationController.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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) 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 namespace blink { 60 namespace blink {
61 61
62 // static 62 // static
63 VibrationController::VibrationPattern 63 VibrationController::VibrationPattern
64 VibrationController::sanitizeVibrationPattern( 64 VibrationController::sanitizeVibrationPattern(
65 const UnsignedLongOrUnsignedLongSequence& pattern) { 65 const UnsignedLongOrUnsignedLongSequence& pattern) {
66 VibrationPattern sanitized; 66 VibrationPattern sanitized;
67 67
68 if (pattern.isUnsignedLong()) 68 if (pattern.isUnsignedLong())
69 sanitized.append(pattern.getAsUnsignedLong()); 69 sanitized.push_back(pattern.getAsUnsignedLong());
70 else if (pattern.isUnsignedLongSequence()) 70 else if (pattern.isUnsignedLongSequence())
71 sanitized = pattern.getAsUnsignedLongSequence(); 71 sanitized = pattern.getAsUnsignedLongSequence();
72 72
73 return sanitizeVibrationPatternInternal(sanitized); 73 return sanitizeVibrationPatternInternal(sanitized);
74 } 74 }
75 75
76 VibrationController::VibrationController(Document& document) 76 VibrationController::VibrationController(Document& document)
77 : ContextLifecycleObserver(&document), 77 : ContextLifecycleObserver(&document),
78 PageVisibilityObserver(document.page()), 78 PageVisibilityObserver(document.page()),
79 m_timerDoVibrate(this, &VibrationController::doVibrate), 79 m_timerDoVibrate(this, &VibrationController::doVibrate),
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (!page()->isPageVisible()) 183 if (!page()->isPageVisible())
184 cancel(); 184 cancel();
185 } 185 }
186 186
187 DEFINE_TRACE(VibrationController) { 187 DEFINE_TRACE(VibrationController) {
188 ContextLifecycleObserver::trace(visitor); 188 ContextLifecycleObserver::trace(visitor);
189 PageVisibilityObserver::trace(visitor); 189 PageVisibilityObserver::trace(visitor);
190 } 190 }
191 191
192 } // namespace blink 192 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698