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

Side by Side Diff: third_party/WebKit/Source/modules/vibration/NavigatorVibration.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 // static 52 // static
53 const char* NavigatorVibration::supplementName() { 53 const char* NavigatorVibration::supplementName() {
54 return "NavigatorVibration"; 54 return "NavigatorVibration";
55 } 55 }
56 56
57 // static 57 // static
58 bool NavigatorVibration::vibrate(Navigator& navigator, unsigned time) { 58 bool NavigatorVibration::vibrate(Navigator& navigator, unsigned time) {
59 VibrationPattern pattern; 59 VibrationPattern pattern;
60 pattern.append(time); 60 pattern.push_back(time);
61 return NavigatorVibration::vibrate(navigator, pattern); 61 return NavigatorVibration::vibrate(navigator, pattern);
62 } 62 }
63 63
64 // static 64 // static
65 bool NavigatorVibration::vibrate(Navigator& navigator, 65 bool NavigatorVibration::vibrate(Navigator& navigator,
66 const VibrationPattern& pattern) { 66 const VibrationPattern& pattern) {
67 LocalFrame* frame = navigator.frame(); 67 LocalFrame* frame = navigator.frame();
68 68
69 // There will be no frame if the window has been closed, but a JavaScript 69 // There will be no frame if the window has been closed, but a JavaScript
70 // reference to |window| or |navigator| was retained in another window. 70 // reference to |window| or |navigator| was retained in another window.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 } 141 }
142 142
143 DEFINE_TRACE(NavigatorVibration) { 143 DEFINE_TRACE(NavigatorVibration) {
144 visitor->trace(m_controller); 144 visitor->trace(m_controller);
145 Supplement<Navigator>::trace(visitor); 145 Supplement<Navigator>::trace(visitor);
146 ContextLifecycleObserver::trace(visitor); 146 ContextLifecycleObserver::trace(visitor);
147 } 147 }
148 148
149 } // namespace blink 149 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698