1 // Copyright 2015 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.
5 #ifndef CHROMECAST_BASE_ANDROID_SYSTEM_TIME_CHANGE_NOTIFIER_ANDROID_H_
6 #define CHROMECAST_BASE_ANDROID_SYSTEM_TIME_CHANGE_NOTIFIER_ANDROID_H_
8 #include "base/android/scoped_java_ref.h"
9 #include "base/macros.h"
10 #include "chromecast/base/system_time_change_notifier.h"
12 namespace chromecast
{
14 class SystemTimeChangeNotifierAndroid
: public SystemTimeChangeNotifier
{
16 static bool RegisterJni(JNIEnv
* env
);
18 SystemTimeChangeNotifierAndroid();
19 ~SystemTimeChangeNotifierAndroid() override
;
21 // SystemTimeChangeNotifier implementation:
22 void Initialize() override
;
23 void Finalize() override
;
26 void OnTimeChanged(JNIEnv
* env
, jobject jobj
);
29 base::android::ScopedJavaGlobalRef
<jobject
> java_notifier_
;
31 DISALLOW_COPY_AND_ASSIGN(SystemTimeChangeNotifierAndroid
);
34 } // namespace chromecast
36 #endif // CHROMECAST_BASE_ANDROID_SYSTEM_TIME_CHANGE_NOTIFIER_ANDROID_H_