Title: [101625] trunk/Source/WebCore
- Revision
- 101625
- Author
- leo.y...@torchmobile.com.cn
- Date
- 2011-11-30 23:47:27 -0800 (Wed, 30 Nov 2011)
Log Message
Upstream platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=73522
Reviewed by Daniel Bates.
Initial upstream, can't be built yet, no new tests.
* platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp: Added.
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
(WebCore::NetworkStateNotifier::networkStateChange):
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (101624 => 101625)
--- trunk/Source/WebCore/ChangeLog 2011-12-01 07:43:38 UTC (rev 101624)
+++ trunk/Source/WebCore/ChangeLog 2011-12-01 07:47:27 UTC (rev 101625)
@@ -1,3 +1,16 @@
+2011-11-30 Leo Yang <leo.y...@torchmobile.com.cn>
+
+ Upstream platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=73522
+
+ Reviewed by Daniel Bates.
+
+ Initial upstream, can't be built yet, no new tests.
+
+ * platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp: Added.
+ (WebCore::NetworkStateNotifier::NetworkStateNotifier):
+ (WebCore::NetworkStateNotifier::networkStateChange):
+
2011-11-30 David Reveman <reve...@chromium.org>
[Chromium] Improve tile invalidation
Added: trunk/Source/WebCore/platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp (0 => 101625)
--- trunk/Source/WebCore/platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp (rev 0)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp 2011-12-01 07:47:27 UTC (rev 101625)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009, The Android Open Source Project
+ * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "NetworkStateNotifier.h"
+
+#include <BlackBerryPlatformClient.h>
+
+namespace WebCore {
+
+NetworkStateNotifier::NetworkStateNotifier()
+ : m_isOnLine(BlackBerry::Platform::Client::get()->isNetworkAvailable())
+ , m_networkStateChangedFunction(0)
+{
+}
+
+void NetworkStateNotifier::networkStateChange(bool online)
+{
+ if (m_isOnLine == online)
+ return;
+
+ m_isOnLine = online;
+
+ if (m_networkStateChangedFunction)
+ m_networkStateChangedFunction();
+}
+
+} // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes