OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file integrates ThreadWatcher with Android's activity life-cycle. | 5 // This file integrates ThreadWatcher with Android's activity life-cycle. |
6 // When Activity.onStop() is called, in order to preserve battery, it will | 6 // When Activity.onStop() is called, in order to preserve battery, it will |
7 // deactive the thread watcher. Conversely, when onRestart() is called, | 7 // deactive the thread watcher. Conversely, when onRestart() is called, |
8 // it will reactivate. | 8 // it will reactivate. |
9 // See more details in: | 9 // See more details in: |
10 // http://developer.android.com/training/basics/activity-lifecycle/stopping.html | 10 // http://developer.android.com/training/basics/activity-lifecycle/stopping.html |
11 | 11 |
12 #ifndef CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_ | 12 #ifndef CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_ |
13 #define CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_ | 13 #define CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_ |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/macros.h" |
16 | 16 |
17 class ThreadWatcherAndroid { | 17 class ThreadWatcherAndroid { |
18 public: | 18 public: |
19 static void RegisterApplicationStatusListener(); | 19 static void RegisterApplicationStatusListener(); |
20 | 20 |
21 private: | 21 private: |
22 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadWatcherAndroid); | 22 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadWatcherAndroid); |
23 }; | 23 }; |
24 | 24 |
25 #endif // CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_ | 25 #endif // CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_ |
OLD | NEW |