Index: content/browser/device_orientation/message_filter.h |
diff --git a/content/browser/device_orientation/orientation_message_filter.h b/content/browser/device_orientation/message_filter.h |
similarity index 51% |
copy from content/browser/device_orientation/orientation_message_filter.h |
copy to content/browser/device_orientation/message_filter.h |
index 1adf780859b1aa9ce6ce16c5f3a8f58c7f17fc90..f71fea2dd97f5b9aa0a5f5fb33ece3c1a35db541 100644 |
--- a/content/browser/device_orientation/orientation_message_filter.h |
+++ b/content/browser/device_orientation/message_filter.h |
@@ -2,41 +2,42 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_ORIENTATION_MESSAGE_FILTER_H_ |
-#define CONTENT_BROWSER_DEVICE_ORIENTATION_ORIENTATION_MESSAGE_FILTER_H_ |
+#ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_MESSAGE_FILTER_H_ |
+#define CONTENT_BROWSER_DEVICE_ORIENTATION_MESSAGE_FILTER_H_ |
#include <map> |
-#include "content/browser/device_orientation/provider.h" |
+#include "content/browser/device_orientation/device_data.h" |
#include "content/public/browser/browser_message_filter.h" |
namespace device_orientation { |
-class OrientationMessageFilter : public content::BrowserMessageFilter { |
- public: |
- OrientationMessageFilter(); |
+// Helper class that observes a Provider and forwards updates to a RenderView. |
+class ObserverDelegate; |
+class Provider; |
hans
2012/08/03 13:05:41
i'd add an extra newline before this, to make it c
aousterh
2012/08/03 13:42:18
Done.
|
+class MessageFilter : public content::BrowserMessageFilter { |
+ public: |
// content::BrowserMessageFilter implementation. |
virtual bool OnMessageReceived(const IPC::Message& message, |
- bool* message_was_ok) OVERRIDE; |
+ bool* message_was_ok) OVERRIDE = 0; |
- private: |
- virtual ~OrientationMessageFilter(); |
+ protected: |
+ MessageFilter(DeviceData::Type device_data_type); |
+ virtual ~MessageFilter(); |
void OnStartUpdating(int render_view_id); |
void OnStopUpdating(int render_view_id); |
- // Helper class that observes a Provider and forwards updates to a RenderView. |
- class ObserverDelegate; |
+ private: |
// map from render_view_id to ObserverDelegate. |
std::map<int, scoped_refptr<ObserverDelegate> > observers_map_; |
scoped_refptr<Provider> provider_; |
- |
- DISALLOW_COPY_AND_ASSIGN(OrientationMessageFilter); |
+ DeviceData::Type device_data_type_; |
}; |
} // namespace device_orientation |
-#endif // CONTENT_BROWSER_DEVICE_ORIENTATION_ORIENTATION_MESSAGE_FILTER_H_ |
+#endif // CONTENT_BROWSER_DEVICE_ORIENTATION_MESSAGE_FILTER_H_ |