We started redesigning GpuMemoryBuffer interface to handle multiple buffers [0].
[chromium-blink-merge.git] / chromecast / android / chromecast_config_android.h
blobe09d657acc92dffb186182e5cd03cedb192e255b
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.
5 #ifndef CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_
6 #define CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_
8 #include <jni.h>
10 #include "base/callback.h"
11 #include "base/lazy_instance.h"
12 #include "base/macros.h"
14 namespace chromecast {
15 namespace android {
17 class ChromecastConfigAndroid {
18 public:
19 static ChromecastConfigAndroid* GetInstance();
21 // Returns whether or not the user has allowed sending usage stats and
22 // crash reports.
23 bool CanSendUsageStats();
25 // Registers a handler to be notified when SendUsageStats is changed.
26 void SetSendUsageStatsChangedCallback(
27 const base::Callback<void(bool)>& callback);
29 const base::Callback<void(bool)>& send_usage_stats_changed_callback() const {
30 return send_usage_stats_changed_callback_;
33 private:
34 friend struct base::DefaultLazyInstanceTraits<ChromecastConfigAndroid>;
36 ChromecastConfigAndroid();
37 ~ChromecastConfigAndroid();
39 base::Callback<void(bool)> send_usage_stats_changed_callback_;
41 DISALLOW_COPY_AND_ASSIGN(ChromecastConfigAndroid);
44 } // namespace android
45 } // namespace chromecast
47 #endif // CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_