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

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

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, 1 month 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/sensors_provider_impl.h ('k') | content/common/sensors.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/sensors/sensors_provider_impl.h" 5 #include "content/browser/sensors/sensors_provider_impl.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 8
9 using content::SensorsListener;
10
9 namespace sensors { 11 namespace sensors {
10 12
11 ProviderImpl* ProviderImpl::GetInstance() { 13 ProviderImpl* ProviderImpl::GetInstance() {
12 return Singleton<ProviderImpl>::get(); 14 return Singleton<ProviderImpl>::get();
13 } 15 }
14 16
15 ProviderImpl::ProviderImpl() 17 ProviderImpl::ProviderImpl()
16 : listeners_(new ListenerList()) { 18 : listeners_(new ListenerList()) {
17 } 19 }
18 20
19 ProviderImpl::~ProviderImpl() { 21 ProviderImpl::~ProviderImpl() {
20 } 22 }
21 23
22 void ProviderImpl::AddListener(Listener* listener) { 24 void ProviderImpl::AddListener(SensorsListener* listener) {
23 listeners_->AddObserver(listener); 25 listeners_->AddObserver(listener);
24 } 26 }
25 27
26 void ProviderImpl::RemoveListener(Listener* listener) { 28 void ProviderImpl::RemoveListener(SensorsListener* listener) {
27 listeners_->RemoveObserver(listener); 29 listeners_->RemoveObserver(listener);
28 } 30 }
29 31
30 void ProviderImpl::ScreenOrientationChanged( 32 void ProviderImpl::ScreenOrientationChanged(
31 const ScreenOrientation& change) { 33 content::ScreenOrientation change) {
32 listeners_->Notify(&Listener::OnScreenOrientationChanged, change); 34 listeners_->Notify(&SensorsListener::OnScreenOrientationChanged, change);
33 } 35 }
34 36
35 } // namespace sensors 37 } // namespace sensors
OLDNEW
« no previous file with comments | « content/browser/sensors/sensors_provider_impl.h ('k') | content/common/sensors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698