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

Side by Side Diff: content/browser/sensors/provider_impl.h

Issue 7455002: Revert 93094 - Initial sensor event provider for testing views screen rotation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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
« no previous file with comments | « content/browser/sensors/provider.cc ('k') | content/browser/sensors/provider_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_SENSORS_PROVIDER_IMPL_H_
6 #define CONTENT_BROWSER_SENSORS_PROVIDER_IMPL_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10 #include "base/observer_list_threadsafe.h"
11 #include "base/task.h"
12 #include "content/browser/sensors/provider.h"
13
14 template <typename T>
15 struct DefaultSingletonTraits;
16
17 namespace sensors {
18
19 class ProviderImpl : public Provider {
20 public:
21 static ProviderImpl* GetInstance();
22
23 // Provider implementation
24 virtual void AddListener(Listener* listener);
25 virtual void RemoveListener(Listener* listener);
26 virtual void ScreenOrientationChanged(const ScreenOrientation& change);
27
28 private:
29 friend struct DefaultSingletonTraits<ProviderImpl>;
30
31 ProviderImpl();
32 virtual ~ProviderImpl();
33
34 typedef ObserverListThreadSafe<Listener> ListenerList;
35 scoped_refptr<ListenerList> listeners_;
36
37 DISALLOW_COPY_AND_ASSIGN(ProviderImpl);
38 };
39
40 } // namespace sensors
41
42 DISABLE_RUNNABLE_METHOD_REFCOUNT(sensors::ProviderImpl);
43
44 #endif // CONTENT_BROWSER_SENSORS_PROVIDER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/sensors/provider.cc ('k') | content/browser/sensors/provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698