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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_VIBRATION_VIBRATION_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_VIBRATION_VIBRATION_MESSAGE_FILTER_H_
8 #include "content/public/browser/browser_message_filter.h"
12 class VibrationProvider;
14 // VibrationMessageFilter is a browser filter for Vibration messages.
15 class VibrationMessageFilter : public BrowserMessageFilter {
17 VibrationMessageFilter();
20 virtual ~VibrationMessageFilter();
21 // BrowserMessageFilter implementation.
22 virtual bool OnMessageReceived(const IPC::Message& message,
23 bool* message_was_ok) OVERRIDE;
25 void OnVibrate(int64 milliseconds);
26 void OnCancelVibration();
27 static VibrationProvider* CreateProvider();
29 scoped_ptr<VibrationProvider> provider_;
30 DISALLOW_COPY_AND_ASSIGN(VibrationMessageFilter);
33 } // namespace content
35 #endif // CONTENT_BROWSER_VIBRATION_VIBRATION_MESSAGE_FILTER_H_