OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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 "content/browser/device_orientation/data_fetcher_orientation_android.h" | |
6 | |
7 #include "base/logging.h" | |
8 #include "content/browser/device_orientation/data_fetcher_impl_android.h" | |
9 | |
10 namespace content { | |
11 | |
12 DataFetcherOrientationAndroid::DataFetcherOrientationAndroid() { | |
13 } | |
14 | |
15 DataFetcherOrientationAndroid::~DataFetcherOrientationAndroid() { | |
16 DataFetcherImplAndroid::GetInstance()->Stop(DeviceData::kTypeOrientation); | |
17 } | |
18 | |
19 DataFetcher* DataFetcherOrientationAndroid::Create() { | |
20 scoped_ptr<DataFetcherOrientationAndroid> fetcher( | |
21 new DataFetcherOrientationAndroid); | |
22 if (DataFetcherImplAndroid::GetInstance()->Start( | |
23 DeviceData::kTypeOrientation)) | |
24 return fetcher.release(); | |
bulach
2013/07/12 14:00:41
nit: .pass() once it return scoped_ptr
timvolodine
2013/07/12 15:22:18
let's handle this in a separate CL, because I thin
| |
25 | |
26 DVLOG(2) << "DataFetcherImplAndroid::Start failed!"; | |
27 return NULL; | |
28 } | |
29 | |
30 const DeviceData* DataFetcherOrientationAndroid::GetDeviceData( | |
31 DeviceData::Type type) { | |
32 if (type != DeviceData::kTypeOrientation) | |
33 return NULL; | |
34 return DataFetcherImplAndroid::GetInstance()->GetDeviceData(type); | |
35 } | |
36 | |
37 } // namespace content | |
OLD | NEW |