OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |