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

Side by Side Diff: content/common/sensors_listener.h

Issue 7273073: Animated Rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_COMMON_SENSORS_LISTENER_H_
6 #define CONTENT_COMMON_SENSORS_LISTENER_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h"
11 #include "content/common/sensors.h"
12
13 #include <string>
14
15 namespace sensors {
16
17 class Listener {
18 public:
19 virtual void SensorChanged(Channel channel, const std::string& data) = 0;
20
21 // TODO(cwolfe): Provide remaining events
22 // virtual void SensorUpdated(Channel channel, const std::string& data) = 0;
23 // virtual void SensorPaused(Channel channel) = 0;
24 // virtual void SensorStopped(Channel channel) = 0;
25
26 protected:
27 Listener() {}
28 virtual ~Listener() {}
29
30 DISALLOW_COPY_AND_ASSIGN(Listener);
31 };
32
33 class Connection : public base::RefCountedThreadSafe<Connection> {
34 public:
35 virtual void Start(Channel channel, const std::string& data) = 0;
36 virtual void Stop(Channel channel) = 0;
37 virtual void Close() = 0;
38
39 protected:
40 Connection() {};
41 virtual ~Connection() {};
42 friend class base::RefCountedThreadSafe<Connection>;
43
44 DISALLOW_COPY_AND_ASSIGN(Connection);
45 };
46
47 } // namespace sensors
48
49 #endif // CONTENT_COMMON_SENSORS_LISTENER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698