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

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

Issue 7366011: Initial sensor event provider for testing views screen rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Renamed content/browser files to work around Win Builder 2010 bug. 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 #include "base/logging.h"
tfarina 2011/07/22 15:04:42 not used, please can you remove?
6 #include "base/memory/singleton.h"
7 #include "content/browser/sensors/sensors_provider_impl.h"
8
9 namespace sensors {
10
11 ProviderImpl* ProviderImpl::GetInstance() {
12 return Singleton<ProviderImpl>::get();
13 }
14
15 ProviderImpl::ProviderImpl()
16 : listeners_(new ListenerList()) {
17 }
18
19 ProviderImpl::~ProviderImpl() {
20 }
21
22 void ProviderImpl::AddListener(Listener* listener) {
23 listeners_->AddObserver(listener);
24 }
25
26 void ProviderImpl::RemoveListener(Listener* listener) {
27 listeners_->RemoveObserver(listener);
28 }
29
30 void ProviderImpl::ScreenOrientationChanged(
31 const ScreenOrientation& change) {
32 listeners_->Notify(&Listener::OnScreenOrientationChanged, change);
33 }
34
35 } // namespace sensors
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698