Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: content/browser/device_orientation/device_data.h

Issue 10698046: Implements part of Device Motion in the Renderer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resets last_motion_ Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/device_orientation/device_orientation_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_ 5 #ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_
6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_ 6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 10
11 namespace IPC { 11 namespace IPC {
12 class Message; 12 class Message;
13 } 13 }
14 14
15 namespace content { 15 namespace content {
16 16
17 class CONTENT_EXPORT DeviceData : 17 class CONTENT_EXPORT DeviceData :
18 public base::RefCountedThreadSafe<DeviceData> { 18 public base::RefCountedThreadSafe<DeviceData> {
19 public: 19 public:
20 enum Type { 20 enum Type {
21 kTypeMotion,
21 kTypeOrientation, 22 kTypeOrientation,
22 kTypeTest 23 kTypeTest
23 }; 24 };
24 25
25 virtual IPC::Message* CreateIPCMessage(int render_view_id) const = 0; 26 virtual IPC::Message* CreateIPCMessage(int render_view_id) const = 0;
26 virtual bool ShouldFireEvent(const DeviceData* other) const = 0; 27 virtual bool ShouldFireEvent(const DeviceData* other) const = 0;
27 28
28 protected: 29 protected:
29 DeviceData() {} 30 DeviceData() {}
30 virtual ~DeviceData() {} 31 virtual ~DeviceData() {}
31 32
32 private: 33 private:
33 friend class base::RefCountedThreadSafe<DeviceData>; 34 friend class base::RefCountedThreadSafe<DeviceData>;
34 35
35 DISALLOW_COPY_AND_ASSIGN(DeviceData); 36 DISALLOW_COPY_AND_ASSIGN(DeviceData);
36 }; 37 };
37 38
38 } // namespace content 39 } // namespace content
39 40
40 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_ 41 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/device_orientation/device_orientation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698