OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_ANDROID_VIBRATION_MESSAGE_FILTER_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_VIBRATION_MESSAGE_FILTER_H_ |
| 7 |
| 8 #include "base/android/jni_android.h" |
| 9 #include "content/public/browser/browser_message_filter.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class VibrationMessageFilter : public BrowserMessageFilter { |
| 14 public: |
| 15 VibrationMessageFilter(); |
| 16 |
| 17 static bool Register(JNIEnv* env); |
| 18 |
| 19 private: |
| 20 virtual ~VibrationMessageFilter(); |
| 21 |
| 22 // BrowserMessageFilter implementation. |
| 23 virtual bool OnMessageReceived(const IPC::Message& message, |
| 24 bool* message_was_ok) OVERRIDE; |
| 25 |
| 26 void OnVibrate(int64 milliseconds); |
| 27 void OnCancelVibration(); |
| 28 |
| 29 base::android::ScopedJavaGlobalRef<jobject> j_vibration_message_filter_; |
| 30 }; |
| 31 |
| 32 } // namespace content |
| 33 |
| 34 #endif // CONTENT_BROWSER_ANDROID_VIBRATION_MESSAGE_FILTER_H_ |
OLD | NEW |