Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: chromecast/android/chromecast_config_android.h

Issue 490603002: Chromecast: initial checkin of Android-based cast shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 #ifndef CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_
6 #define CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_
7
8 #include <jni.h>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12
13 namespace chromecast {
14 namespace android {
15
16 class ChromecastConfigAndroid {
17 public:
18 static bool RegisterJni(JNIEnv* env);
19 static ChromecastConfigAndroid* GetInstance();
20
21 // Android build may provide this value as a system setting through the
22 // Android preferences API.
23 bool CanSendUsageStats();
Yaron 2014/08/20 18:11:01 Should this be handled as part of the MetricsServi
gunsch 2014/08/21 22:31:27 We do use MetricsService, and provide our own Metr
24
25 // Registers a handler to be notified when SendUsageStats is changed.
26 void SetSendUsageStatsChangedCallback(
27 const base::Callback<void(bool)>& callback);
28
29 const base::Callback<void(bool)>& send_usage_stats_changed_callback() {
30 return send_usage_stats_changed_callback_;
31 }
32
33 private:
34 ChromecastConfigAndroid();
35 ~ChromecastConfigAndroid();
36
37 base::Callback<void(bool)> send_usage_stats_changed_callback_;
38
39 DISALLOW_COPY_AND_ASSIGN(ChromecastConfigAndroid);
40 };
41
42 }
43 } // namespace chromecast
44
45 #endif // CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698