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

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

Issue 10115024: sensors: Remove prototype implementation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
« no previous file with comments | « content/browser/sensors/sensors_provider_impl.h ('k') | content/content_browser.gypi » ('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) 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 #include "content/browser/sensors/sensors_provider_impl.h"
6
7 #include "base/memory/singleton.h"
8 #include "content/public/browser/sensors_listener.h"
9
10 namespace content {
11
12 // static
13 SensorsProvider* SensorsProvider::GetInstance() {
14 return SensorsProviderImpl::GetInstance();
15 }
16
17 // static
18 SensorsProviderImpl* SensorsProviderImpl::GetInstance() {
19 return Singleton<SensorsProviderImpl>::get();
20 }
21
22 void SensorsProviderImpl::AddListener(SensorsListener* listener) {
23 listeners_->AddObserver(listener);
24 }
25
26 void SensorsProviderImpl::RemoveListener(SensorsListener* listener) {
27 listeners_->RemoveObserver(listener);
28 }
29
30 void SensorsProviderImpl::ScreenOrientationChanged(ScreenOrientation change) {
31 listeners_->Notify(&SensorsListener::OnScreenOrientationChanged, change);
32 }
33
34 SensorsProviderImpl::SensorsProviderImpl()
35 : listeners_(new ListenerList()) {
36 }
37
38 SensorsProviderImpl::~SensorsProviderImpl() {
39 }
40
41 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/sensors/sensors_provider_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698