Home | History | Annotate | Download | only in device_orientation
      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 #ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_
      6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_
      7 
      8 #include <vector>
      9 
     10 #include "base/compiler_specific.h"
     11 #include "base/memory/scoped_ptr.h"
     12 #include "content/browser/device_orientation/data_fetcher.h"
     13 #include "content/browser/device_orientation/device_data.h"
     14 
     15 class SuddenMotionSensor;
     16 
     17 namespace content {
     18 
     19 class Orientation;
     20 
     21 class AccelerometerMac : public DataFetcher {
     22  public:
     23   static DataFetcher* Create();
     24 
     25   // Implement DataFetcher.
     26   virtual const DeviceData* GetDeviceData(DeviceData::Type type) OVERRIDE;
     27 
     28   virtual ~AccelerometerMac();
     29 
     30  private:
     31   AccelerometerMac();
     32   bool Init();
     33   const Orientation* GetOrientation();
     34 
     35   scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_;
     36 };
     37 
     38 }  // namespace content
     39 
     40 #endif  // CONTENT_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_
     41