OLD | NEW |
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_DATA_FETCHER_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_H_ |
6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_H_ | 6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_H_ |
7 | 7 |
8 namespace device_orientation { | 8 namespace device_orientation { |
9 | 9 |
| 10 class Motion; |
10 class Orientation; | 11 class Orientation; |
11 | 12 |
12 class DataFetcher { | 13 class DataFetcher { |
13 public: | 14 public: |
14 virtual ~DataFetcher() {} | 15 virtual ~DataFetcher() {} |
15 | 16 |
16 // Returns false if there was a fatal error getting the orientation. | 17 // Return false if there was a fatal error getting the motion or orientation. |
17 // Returns true otherwise. If the fetcher has orientation data available | 18 // Return true otherwise. If the fetcher has data available it will fill it |
18 // it will fill it in, otherwise the argument will be unaltered. | 19 // in, otherwise the argument will be unaltered. |
| 20 virtual bool GetMotion(Motion*) = 0; |
19 virtual bool GetOrientation(Orientation*) = 0; | 21 virtual bool GetOrientation(Orientation*) = 0; |
20 }; | 22 }; |
21 | 23 |
22 } // namespace device_orientation | 24 } // namespace device_orientation |
23 | 25 |
24 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_H_ | 26 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_H_ |
OLD | NEW |