Chromium Code Reviews| Index: chromecast/android/chromecast_config_android.h |
| diff --git a/chromecast/android/chromecast_config_android.h b/chromecast/android/chromecast_config_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fdeb82bdb34f24724716aff09328bbd4ff7243d3 |
| --- /dev/null |
| +++ b/chromecast/android/chromecast_config_android.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ |
| +#define CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ |
| + |
| +#include <jni.h> |
| + |
| +#include "base/callback.h" |
| +#include "base/lazy_instance.h" |
| +#include "base/macros.h" |
| + |
| +namespace chromecast { |
| +namespace android { |
| + |
| +class ChromecastConfigAndroid { |
| + public: |
| + static ChromecastConfigAndroid* GetInstance(); |
| + |
| + // Registers a handler to be notified when SendUsageStats is changed. |
| + void set_send_usage_stats_changed_callback( |
| + const base::Callback<void(bool)>& callback); |
|
byungchul
2014/08/28 01:34:39
Why not a inline function?
gunsch
2014/08/28 02:59:26
Chromium style guide: "Simple accessors should gen
byungchul
2014/08/28 05:49:48
Do you mean set_send_usage_stats_changed_callback(
|
| + |
| + const base::Callback<void(bool)>& send_usage_stats_changed_callback() const { |
| + return send_usage_stats_changed_callback_; |
| + } |
| + |
| + private: |
| + friend struct base::DefaultLazyInstanceTraits<ChromecastConfigAndroid>; |
| + |
| + ChromecastConfigAndroid(); |
| + ~ChromecastConfigAndroid(); |
| + |
| + base::Callback<void(bool)> send_usage_stats_changed_callback_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ChromecastConfigAndroid); |
| +}; |
| + |
| +} // namespace android |
| +} // namespace chromecast |
| + |
| +#endif // CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_ |