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

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: Removing unused function IsEmpty Created 8 years, 5 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 };
21
22 virtual IPC::Message* CreateIPCMessage(int render_view_id) const = 0;
23 virtual bool ShouldFireEvent(const DeviceData* other) const = 0;
24
25 protected:
26 DeviceData() {}
hans 2012/07/30 16:12:52 i'm not sure this constructor is necessary?
aousterh 2012/08/03 11:08:14 I believe it is necessary because any constructor
27 virtual ~DeviceData() {}
28
29 private:
30 friend class base::RefCountedThreadSafe<DeviceData>;
31
32 DISALLOW_COPY_AND_ASSIGN(DeviceData);
33 };
34
35 } // namespace device_orientation
36
37 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698