OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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_DEVICE_ORIENTATION_DEVICE_DATA_H_ |
| 6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 |
| 10 namespace IPC { |
| 11 class Message; |
| 12 } |
| 13 |
| 14 namespace device_orientation { |
| 15 |
| 16 class DeviceData : public base::RefCountedThreadSafe<DeviceData> { |
| 17 public: |
| 18 enum Type { |
| 19 kTypeOrientation, |
| 20 kTypeTest |
| 21 }; |
| 22 |
| 23 virtual IPC::Message* CreateIPCMessage(int render_view_id) const = 0; |
| 24 virtual bool ShouldFireEvent(const DeviceData* other) const = 0; |
| 25 |
| 26 protected: |
| 27 DeviceData() {} |
| 28 virtual ~DeviceData() {} |
| 29 |
| 30 private: |
| 31 friend class base::RefCountedThreadSafe<DeviceData>; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(DeviceData); |
| 34 }; |
| 35 |
| 36 } // namespace device_orientation |
| 37 |
| 38 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_ |
OLD | NEW |