| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/vibration/vibration_provider_android.h" | 5 #include "content/browser/vibration/vibration_provider_android.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/safe_numerics.h" | |
| 10 #include "content/browser/vibration/vibration_message_filter.h" | 9 #include "content/browser/vibration/vibration_message_filter.h" |
| 11 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| 12 #include "jni/VibrationProvider_jni.h" | 11 #include "jni/VibrationProvider_jni.h" |
| 13 #include "third_party/WebKit/public/platform/WebVibration.h" | 12 #include "third_party/WebKit/public/platform/WebVibration.h" |
| 14 | 13 |
| 15 using base::android::AttachCurrentThread; | 14 using base::android::AttachCurrentThread; |
| 16 | 15 |
| 17 namespace content { | 16 namespace content { |
| 18 | 17 |
| 19 VibrationProviderAndroid::VibrationProviderAndroid() { | 18 VibrationProviderAndroid::VibrationProviderAndroid() { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 48 Java_VibrationProvider_cancelVibration(AttachCurrentThread(), | 47 Java_VibrationProvider_cancelVibration(AttachCurrentThread(), |
| 49 j_vibration_provider_.obj()); | 48 j_vibration_provider_.obj()); |
| 50 } | 49 } |
| 51 | 50 |
| 52 // static | 51 // static |
| 53 VibrationProvider* VibrationMessageFilter::CreateProvider() { | 52 VibrationProvider* VibrationMessageFilter::CreateProvider() { |
| 54 return new VibrationProviderAndroid(); | 53 return new VibrationProviderAndroid(); |
| 55 } | 54 } |
| 56 | 55 |
| 57 } // namespace content | 56 } // namespace content |
| OLD | NEW |