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

Side by Side Diff: content/browser/device_orientation/accelerometer_mac.h

Issue 10755002: Refactors DeviceOrientation to make it more extensible (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Small changes to appease try bots Created 8 years, 4 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 | « no previous file | content/browser/device_orientation/accelerometer_mac.cc » ('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) 2012 The Chromium Authors. All rights reserved. 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 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_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_ 5 #ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_
6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_ 6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "content/browser/device_orientation/data_fetcher.h" 12 #include "content/browser/device_orientation/data_fetcher.h"
13 #include "content/browser/device_orientation/device_data.h"
13 14
14 class SuddenMotionSensor; 15 class SuddenMotionSensor;
15 16
16 namespace device_orientation { 17 namespace device_orientation {
17 18
19 class Orientation;
20
18 class AccelerometerMac : public DataFetcher { 21 class AccelerometerMac : public DataFetcher {
19 public: 22 public:
20 static DataFetcher* Create(); 23 static DataFetcher* Create();
21 24
22 // Implement DataFetcher. 25 // Implement DataFetcher.
23 virtual bool GetOrientation(Orientation* orientation) OVERRIDE; 26 virtual const DeviceData* GetDeviceData(DeviceData::Type type) OVERRIDE;
24 27
25 virtual ~AccelerometerMac(); 28 virtual ~AccelerometerMac();
26 29
27 private: 30 private:
28 AccelerometerMac(); 31 AccelerometerMac();
29 bool Init(); 32 bool Init();
33 const Orientation* GetOrientation();
30 34
31 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_; 35 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_;
32 }; 36 };
33 37
34 } // namespace device_orientation 38 } // namespace device_orientation
35 39
36 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_ 40 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/device_orientation/accelerometer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698