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

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

Issue 8678019: Move sensors interface into content/public/browser (since it's only used by browser directory). M... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix aura typo Created 9 years 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_SENSORS_PROVIDER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_SENSORS_PROVIDER_IMPL_H_
6 #define CONTENT_BROWSER_SENSORS_PROVIDER_IMPL_H_ 6 #define CONTENT_BROWSER_SENSORS_PROVIDER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/observer_list_threadsafe.h" 11 #include "base/observer_list_threadsafe.h"
12 #include "content/browser/sensors/sensors_provider.h" 12 #include "content/browser/sensors/sensors_provider.h"
13 13
14 template <typename T> struct DefaultSingletonTraits; 14 template <typename T> struct DefaultSingletonTraits;
15 15
16 namespace sensors { 16 namespace sensors {
17 17
18 class ProviderImpl : public Provider { 18 class ProviderImpl : public Provider {
19 public: 19 public:
20 static ProviderImpl* GetInstance(); 20 static ProviderImpl* GetInstance();
21 21
22 // Provider implementation 22 // Provider implementation
23 virtual void AddListener(Listener* listener) OVERRIDE; 23 virtual void AddListener(content::SensorsListener* listener) OVERRIDE;
24 virtual void RemoveListener(Listener* listener) OVERRIDE; 24 virtual void RemoveListener(content::SensorsListener* listener) OVERRIDE;
25 virtual void ScreenOrientationChanged( 25 virtual void ScreenOrientationChanged(
26 const ScreenOrientation& change) OVERRIDE; 26 content::ScreenOrientation change) OVERRIDE;
27 27
28 private: 28 private:
29 friend struct DefaultSingletonTraits<ProviderImpl>; 29 friend struct DefaultSingletonTraits<ProviderImpl>;
30 30
31 ProviderImpl(); 31 ProviderImpl();
32 virtual ~ProviderImpl(); 32 virtual ~ProviderImpl();
33 33
34 typedef ObserverListThreadSafe<Listener> ListenerList; 34 typedef ObserverListThreadSafe<content::SensorsListener> ListenerList;
35 scoped_refptr<ListenerList> listeners_; 35 scoped_refptr<ListenerList> listeners_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(ProviderImpl); 37 DISALLOW_COPY_AND_ASSIGN(ProviderImpl);
38 }; 38 };
39 39
40 } // namespace sensors 40 } // namespace sensors
41 41
42 #endif // CONTENT_BROWSER_SENSORS_PROVIDER_IMPL_H_ 42 #endif // CONTENT_BROWSER_SENSORS_PROVIDER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/sensors/sensors_provider.h ('k') | content/browser/sensors/sensors_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698