summaryrefslogtreecommitdiffstats
path: root/chromecast/net
diff options
context:
space:
mode:
authorlcwu@chromium.org <lcwu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-11 02:44:29 +0000
committerlcwu@chromium.org <lcwu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-11 02:44:29 +0000
commit844ac63d83154b0bbba454b071f62c6b00a4e4c6 (patch)
tree03d7998428dee3e6c7103250e2a8221339c27475 /chromecast/net
parent193f047ccc0dec59f7b795ef7dc31626d9276199 (diff)
downloadchromium_src-844ac63d83154b0bbba454b071f62c6b00a4e4c6.zip
chromium_src-844ac63d83154b0bbba454b071f62c6b00a4e4c6.tar.gz
chromium_src-844ac63d83154b0bbba454b071f62c6b00a4e4c6.tar.bz2
Initial checkin of chromecast content embedder (cast_shell) and related build scripts.
BUG=336640 Review URL: https://codereview.chromium.org/223143003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromecast/net')
-rw-r--r--chromecast/net/network_change_notifier_cast.cc20
-rw-r--r--chromecast/net/network_change_notifier_cast.h34
-rw-r--r--chromecast/net/network_change_notifier_factory_cast.cc31
-rw-r--r--chromecast/net/network_change_notifier_factory_cast.h33
4 files changed, 118 insertions, 0 deletions
diff --git a/chromecast/net/network_change_notifier_cast.cc b/chromecast/net/network_change_notifier_cast.cc
new file mode 100644
index 0000000..ab6a218
--- /dev/null
+++ b/chromecast/net/network_change_notifier_cast.cc
@@ -0,0 +1,20 @@
+// 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/net/network_change_notifier_cast.h"
+
+namespace chromecast {
+
+NetworkChangeNotifierCast::NetworkChangeNotifierCast() {
+}
+
+NetworkChangeNotifierCast::~NetworkChangeNotifierCast() {
+}
+
+net::NetworkChangeNotifier::ConnectionType
+NetworkChangeNotifierCast::GetCurrentConnectionType() const {
+ return net::NetworkChangeNotifier::CONNECTION_NONE;
+}
+
+} // namespace chromecast
diff --git a/chromecast/net/network_change_notifier_cast.h b/chromecast/net/network_change_notifier_cast.h
new file mode 100644
index 0000000..7a9aed1
--- /dev/null
+++ b/chromecast/net/network_change_notifier_cast.h
@@ -0,0 +1,34 @@
+// 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_NET_NETWORK_CHANGE_NOTIFIER_CAST_H_
+#define CHROMECAST_NET_NETWORK_CHANGE_NOTIFIER_CAST_H_
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "net/base/network_change_notifier.h"
+
+namespace chromecast {
+
+// TODO(lcwu): http://crbug.com/391064. This is a place holder for
+// cast-specific NetworkChangeNotifier implementation. The actual
+// implementation of this class will come in later CLs.
+class NetworkChangeNotifierCast : public net::NetworkChangeNotifier {
+ public:
+ NetworkChangeNotifierCast();
+ virtual ~NetworkChangeNotifierCast();
+
+ // net::NetworkChangeNotifier implementation:
+ virtual net::NetworkChangeNotifier::ConnectionType
+ GetCurrentConnectionType() const OVERRIDE;
+
+ private:
+ friend class NetworkChangeNotifierCastTest;
+
+ DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierCast);
+};
+
+} // namespace chromecast
+
+#endif // CHROMECAST_NET_NETWORK_CHANGE_NOTIFIER_CAST_H_
diff --git a/chromecast/net/network_change_notifier_factory_cast.cc b/chromecast/net/network_change_notifier_factory_cast.cc
new file mode 100644
index 0000000..1c41171
--- /dev/null
+++ b/chromecast/net/network_change_notifier_factory_cast.cc
@@ -0,0 +1,31 @@
+// 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/net/network_change_notifier_factory_cast.h"
+
+#include "base/lazy_instance.h"
+#include "chromecast/net/network_change_notifier_cast.h"
+
+namespace chromecast {
+
+namespace {
+
+base::LazyInstance<NetworkChangeNotifierCast> g_network_change_notifier_cast =
+ LAZY_INSTANCE_INITIALIZER;
+
+} // namespace
+
+net::NetworkChangeNotifier* NetworkChangeNotifierFactoryCast::CreateInstance() {
+ return g_network_change_notifier_cast.Pointer();
+}
+
+NetworkChangeNotifierFactoryCast::~NetworkChangeNotifierFactoryCast() {
+}
+
+// static
+NetworkChangeNotifierCast* NetworkChangeNotifierFactoryCast::GetInstance() {
+ return g_network_change_notifier_cast.Pointer();
+}
+
+} // namespace chromecast
diff --git a/chromecast/net/network_change_notifier_factory_cast.h b/chromecast/net/network_change_notifier_factory_cast.h
new file mode 100644
index 0000000..6ffa709
--- /dev/null
+++ b/chromecast/net/network_change_notifier_factory_cast.h
@@ -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.
+
+#ifndef CHROMECAST_NET_NETWORK_CHANGE_NOTIFIER_FACTORY_CAST_H_
+#define CHROMECAST_NET_NETWORK_CHANGE_NOTIFIER_FACTORY_CAST_H_
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "net/base/network_change_notifier_factory.h"
+
+namespace chromecast {
+
+class NetworkChangeNotifierCast;
+
+class NetworkChangeNotifierFactoryCast
+ : public net::NetworkChangeNotifierFactory {
+ public:
+ NetworkChangeNotifierFactoryCast() {}
+ virtual ~NetworkChangeNotifierFactoryCast();
+
+ // net::NetworkChangeNotifierFactory implementation:
+ virtual net::NetworkChangeNotifier* CreateInstance() OVERRIDE;
+
+ static NetworkChangeNotifierCast* GetInstance();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierFactoryCast);
+};
+
+} // namespace chromecast
+
+#endif // CHROMECAST_NET_NETWORK_CHANGE_NOTIFIER_FACTORY_CAST_H_