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

Unified 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: missed a spot 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 side-by-side diff with in-line comments
Download patch
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..7600c4d63b77037153747cb8ec8e6b99de53ea60
--- /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 SetSendUsageStatsChangedCallback(
byungchul 2014/08/27 18:54:27 set_send_usage_stats_chcnaged_callback
gunsch 2014/08/28 00:12:08 Done.
+ const base::Callback<void(bool)>& callback);
+
+ const base::Callback<void(bool)>& send_usage_stats_changed_callback() {
byungchul 2014/08/27 18:54:27 const function.
gunsch 2014/08/28 00:12:08 Done.
+ 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);
+};
+
+}
lcwu1 2014/08/27 02:33:02 nit: add a comment "// namespace android"
gunsch 2014/08/28 00:12:08 Done.
+} // namespace chromecast
+
+#endif // CHROMECAST_ANDROID_CHROMECAST_CONFIG_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698