| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/device_orientation/provider.h" | 5 #include "content/browser/device_orientation/provider.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/browser_thread.h" | 8 #include "content/browser/browser_thread.h" |
| 9 #include "content/browser/device_orientation/data_fetcher.h" |
| 10 #include "content/browser/device_orientation/provider_impl.h" |
| 9 | 11 |
| 10 #if defined(OS_MACOSX) | 12 #if defined(OS_MACOSX) |
| 11 #include "chrome/browser/device_orientation/accelerometer_mac.h" | 13 #include "content/browser/device_orientation/accelerometer_mac.h" |
| 12 #endif | 14 #endif |
| 13 | 15 |
| 14 #include "chrome/browser/device_orientation/data_fetcher.h" | |
| 15 #include "chrome/browser/device_orientation/provider_impl.h" | |
| 16 | |
| 17 namespace device_orientation { | 16 namespace device_orientation { |
| 18 | 17 |
| 19 Provider* Provider::GetInstance() { | 18 Provider* Provider::GetInstance() { |
| 20 if (!instance_) { | 19 if (!instance_) { |
| 21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 20 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 22 const ProviderImpl::DataFetcherFactory default_factories[] = { | 21 const ProviderImpl::DataFetcherFactory default_factories[] = { |
| 23 #if defined(OS_MACOSX) | 22 #if defined(OS_MACOSX) |
| 24 AccelerometerMac::Create, | 23 AccelerometerMac::Create, |
| 25 #endif | 24 #endif |
| 26 NULL | 25 NULL |
| (...skipping 17 matching lines...) Expand all Loading... |
| 44 } | 43 } |
| 45 | 44 |
| 46 Provider::~Provider() { | 45 Provider::~Provider() { |
| 47 DCHECK(instance_ == this); | 46 DCHECK(instance_ == this); |
| 48 instance_ = NULL; | 47 instance_ = NULL; |
| 49 } | 48 } |
| 50 | 49 |
| 51 Provider* Provider::instance_ = NULL; | 50 Provider* Provider::instance_ = NULL; |
| 52 | 51 |
| 53 } // namespace device_orientation | 52 } // namespace device_orientation |
| OLD | NEW |