OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROVIDER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_PROVIDER_IMPL_H_ |
6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_PROVIDER_IMPL_H_ | 6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_PROVIDER_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/task.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "content/browser/device_orientation/data_fetcher.h" | 13 #include "content/browser/device_orientation/data_fetcher.h" |
14 #include "content/browser/device_orientation/orientation.h" | 14 #include "content/browser/device_orientation/orientation.h" |
15 #include "content/browser/device_orientation/provider.h" | 15 #include "content/browser/device_orientation/provider.h" |
16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
17 | 17 |
18 class MessageLoop; | 18 class MessageLoop; |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 class Thread; | 21 class Thread; |
22 } | 22 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 | 69 |
70 // Members below are only to be used from the creator_loop_. | 70 // Members below are only to be used from the creator_loop_. |
71 std::vector<DataFetcherFactory> factories_; | 71 std::vector<DataFetcherFactory> factories_; |
72 std::set<Observer*> observers_; | 72 std::set<Observer*> observers_; |
73 Orientation last_notification_; | 73 Orientation last_notification_; |
74 | 74 |
75 // When polling_thread_ is running, members below are only to be used | 75 // When polling_thread_ is running, members below are only to be used |
76 // from that thread. | 76 // from that thread. |
77 scoped_ptr<DataFetcher> data_fetcher_; | 77 scoped_ptr<DataFetcher> data_fetcher_; |
78 Orientation last_orientation_; | 78 Orientation last_orientation_; |
79 ScopedRunnableMethodFactory<ProviderImpl> do_poll_method_factory_; | 79 base::WeakPtrFactory<ProviderImpl> do_poll_method_factory_; |
James Hawkins
2011/11/14 17:57:06
s/do_poll_method_factory/weak_factory_/
dcheng
2011/11/14 20:47:49
Done.
| |
80 | 80 |
81 // Polling is done on this background thread. | 81 // Polling is done on this background thread. |
82 scoped_ptr<base::Thread> polling_thread_; | 82 scoped_ptr<base::Thread> polling_thread_; |
83 }; | 83 }; |
84 | 84 |
85 } // namespace device_orientation | 85 } // namespace device_orientation |
86 | 86 |
87 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_PROVIDER_IMPL_H_ | 87 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_PROVIDER_IMPL_H_ |
OLD | NEW |