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

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

Issue 18572014: Implement Android shared memory data fetcher for Device Motion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@renderer-sync-12June-tryASYNC-2-bis-tryRebase-6
Patch Set: fixed comments, added proper singleton implementation and shutdown. Created 7 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
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"
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 static DataFetcher* Create(); 23 static DataFetcher* Create();
24 24
25 // Implement DataFetcher. 25 // Implement DataFetcher.
26 virtual const DeviceData* GetDeviceData(DeviceData::Type type) OVERRIDE; 26 virtual const DeviceData* GetDeviceData(DeviceData::Type type) OVERRIDE;
27 27
28 virtual ~AccelerometerMac(); 28 virtual ~AccelerometerMac();
29 29
30 private: 30 private:
31 AccelerometerMac(); 31 AccelerometerMac();
32 static AccelerometerMac* instance();
32 bool Init(); 33 bool Init();
33 const Orientation* GetOrientation(); 34 const Orientation* GetOrientation();
34 35
35 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_; 36 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_;
36 }; 37 };
37 38
38 } // namespace content 39 } // namespace content
39 40
40 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_ 41 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698