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

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

Issue 10755002: Refactors DeviceOrientation to make it more extensible (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adds a unit test, responds to other comments 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698