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.
4
5#ifndef CONTENT_BROWSER_VIBRATION_VIBRATION_MESSAGE_FILTER_H_
6#define CONTENT_BROWSER_VIBRATION_VIBRATION_MESSAGE_FILTER_H_
7
8#include "content/public/browser/browser_message_filter.h"
9
10namespace content {
11
12class VibrationProvider;
13
14// VibrationMessageFilter is a browser filter for Vibration messages.
15class VibrationMessageFilter : public BrowserMessageFilter {
16 public:
17  VibrationMessageFilter();
18
19 private:
20  virtual ~VibrationMessageFilter();
21  // BrowserMessageFilter implementation.
22  virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
23
24  void OnVibrate(int64 milliseconds);
25  void OnCancelVibration();
26  static VibrationProvider* CreateProvider();
27
28  scoped_ptr<VibrationProvider> provider_;
29  DISALLOW_COPY_AND_ASSIGN(VibrationMessageFilter);
30};
31
32}  // namespace content
33
34#endif  // CONTENT_BROWSER_VIBRATION_VIBRATION_MESSAGE_FILTER_H_
35