summaryrefslogtreecommitdiff
path: root/chromium/chromecast/android
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@theqtcompany.com>2014-12-05 15:04:29 +0100
committerAndras Becsi <andras.becsi@theqtcompany.com>2014-12-09 10:49:28 +0100
commitaf6588f8d723931a298c995fa97259bb7f7deb55 (patch)
tree060ca707847ba1735f01af2372e0d5e494dc0366 /chromium/chromecast/android
parent2fff84d821cc7b1c785f6404e0f8091333283e74 (diff)
downloadqtwebengine-chromium-af6588f8d723931a298c995fa97259bb7f7deb55.tar.gz
BASELINE: Update chromium to 40.0.2214.28 and ninja to 1.5.3.
Change-Id: I759465284fd64d59ad120219cbe257f7402c4181 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/chromecast/android')
-rw-r--r--chromium/chromecast/android/DEPS6
-rw-r--r--chromium/chromecast/android/chromecast_config_android.cc33
-rw-r--r--chromium/chromecast/android/chromecast_config_android.h47
-rw-r--r--chromium/chromecast/android/chromecast_config_android_stub.cc15
-rw-r--r--chromium/chromecast/android/src/dummy2
5 files changed, 103 insertions, 0 deletions
diff --git a/chromium/chromecast/android/DEPS b/chromium/chromecast/android/DEPS
new file mode 100644
index 00000000000..9659c0589ed
--- /dev/null
+++ b/chromium/chromecast/android/DEPS
@@ -0,0 +1,6 @@
+include_rules = [
+ # Includes for JNI.
+ "+chromecast/android",
+ "+chromecast/browser/android",
+ "+chromecast/crash/android",
+]
diff --git a/chromium/chromecast/android/chromecast_config_android.cc b/chromium/chromecast/android/chromecast_config_android.cc
new file mode 100644
index 00000000000..d698b70a18b
--- /dev/null
+++ b/chromium/chromecast/android/chromecast_config_android.cc
@@ -0,0 +1,33 @@
+// 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.
+
+#include "chromecast/android/chromecast_config_android.h"
+
+namespace chromecast {
+namespace android {
+
+namespace {
+base::LazyInstance<ChromecastConfigAndroid> g_instance =
+ LAZY_INSTANCE_INITIALIZER;
+} // namespace
+
+// static
+ChromecastConfigAndroid* ChromecastConfigAndroid::GetInstance() {
+ return g_instance.Pointer();
+}
+
+ChromecastConfigAndroid::ChromecastConfigAndroid() {
+}
+
+ChromecastConfigAndroid::~ChromecastConfigAndroid() {
+}
+
+// Registers a handler to be notified when SendUsageStats is changed.
+void ChromecastConfigAndroid::SetSendUsageStatsChangedCallback(
+ const base::Callback<void(bool)>& callback) {
+ send_usage_stats_changed_callback_ = callback;
+}
+
+} // namespace android
+} // namespace chromecast
diff --git a/chromium/chromecast/android/chromecast_config_android.h b/chromium/chromecast/android/chromecast_config_android.h
new file mode 100644
index 00000000000..e09d657acc9
--- /dev/null
+++ b/chromium/chromecast/android/chromecast_config_android.h
@@ -0,0 +1,47 @@
+// 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();
+
+ // Returns whether or not the user has allowed sending usage stats and
+ // crash reports.
+ bool CanSendUsageStats();
+
+ // Registers a handler to be notified when SendUsageStats is changed.
+ void SetSendUsageStatsChangedCallback(
+ const base::Callback<void(bool)>& 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_
diff --git a/chromium/chromecast/android/chromecast_config_android_stub.cc b/chromium/chromecast/android/chromecast_config_android_stub.cc
new file mode 100644
index 00000000000..dc8bdca2d6a
--- /dev/null
+++ b/chromium/chromecast/android/chromecast_config_android_stub.cc
@@ -0,0 +1,15 @@
+// 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.
+
+#include "chromecast/android/chromecast_config_android.h"
+
+namespace chromecast {
+namespace android {
+
+bool ChromecastConfigAndroid::CanSendUsageStats() {
+ return false;
+}
+
+} // namespace android
+} // namespace chromecast
diff --git a/chromium/chromecast/android/src/dummy b/chromium/chromecast/android/src/dummy
new file mode 100644
index 00000000000..c1069e016aa
--- /dev/null
+++ b/chromium/chromecast/android/src/dummy
@@ -0,0 +1,2 @@
+Note(gunsch): This file is for the cast_shell_apk target in chromecast.gyp.
+See the notes above that target's 'java_in_dir' variable in chromecast.gyp.