Index: content/browser/vibration/vibration_browser_message_filter.h |
diff --git a/content/browser/vibration/vibration_browser_message_filter.h b/content/browser/vibration/vibration_browser_message_filter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7ad57909b31861af3a24d2bf58e3b03902e51b48 |
--- /dev/null |
+++ b/content/browser/vibration/vibration_browser_message_filter.h |
@@ -0,0 +1,35 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
Peter Beverloo
2013/06/13 11:27:45
This file already is in content/browser/, I'd say
Michael van Ouwerkerk
2013/06/18 14:39:23
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_VIBRATION_VIBRATION_BROWSER_MESSAGE_FILTER_H_ |
+#define CONTENT_BROWSER_VIBRATION_VIBRATION_BROWSER_MESSAGE_FILTER_H_ |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "content/browser/vibration/vibration_service.h" |
+#include "content/public/browser/browser_message_filter.h" |
+ |
+namespace content { |
+ |
+class RenderProcessHost; |
Peter Beverloo
2013/06/13 11:27:45
nit: Unused forward declaration.
Michael van Ouwerkerk
2013/06/18 14:39:23
Done.
|
+ |
+class VibrationBrowserMessageFilter : public BrowserMessageFilter { |
+ public: |
+ VibrationBrowserMessageFilter(scoped_ptr<VibrationService> vibration_service); |
Peter Beverloo
2013/06/13 11:27:45
nit: Pass the scoped_ptr<> as a reference, if you
Michael van Ouwerkerk
2013/06/18 14:39:23
Done.
|
+ |
+ // BrowserMessageFilter implementation. |
+ virtual bool OnMessageReceived(const IPC::Message& message, |
+ bool* message_was_ok) OVERRIDE; |
+ |
+ private: |
+ ~VibrationBrowserMessageFilter(); |
+ |
+ void OnVibrate(unsigned time); |
Peter Beverloo
2013/06/13 11:27:45
nit: maybe naming the time argument "milliseconds"
Michael van Ouwerkerk
2013/06/18 14:39:23
Done.
|
+ void OnCancelVibration(); |
+ |
+ scoped_ptr<VibrationService> vibration_service_; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_VIBRATION_VIBRATION_BROWSER_MESSAGE_FILTER_H_ |