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