[content shell] implement testRunner.overridePreference
[chromium-blink-merge.git] / content / browser / device_orientation / device_data.h
blobae65618ac25fae3c03c1b9056b6261f145af9a40
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.
5 #ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_
6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_
8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h"
11 namespace IPC {
12 class Message;
15 namespace content {
17 class CONTENT_EXPORT DeviceData :
18 public base::RefCountedThreadSafe<DeviceData> {
19 public:
20 enum Type {
21 kTypeMotion,
22 kTypeOrientation,
23 kTypeTest
26 virtual IPC::Message* CreateIPCMessage(int render_view_id) const = 0;
27 virtual bool ShouldFireEvent(const DeviceData* other) const = 0;
29 protected:
30 DeviceData() {}
31 virtual ~DeviceData() {}
33 private:
34 friend class base::RefCountedThreadSafe<DeviceData>;
36 DISALLOW_COPY_AND_ASSIGN(DeviceData);
39 } // namespace content
41 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_