[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:51:48 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 2a645285259de91d5ff02b22fe139bfcec4aad15
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 29 22:50:32 2009 +0000

    2009-12-29  Andrei Popescu  <andreip at google.com>
    
            Reviewed by Adam Barth.
    
            Add Android hook to NetworkStateNotifier class
            so that the Java side can notify WebCore when the
            network state changes.
            https://bugs.webkit.org/show_bug.cgi?id=32871
    
            No new tests required, this is platform code.
    
            * platform/network/NetworkStateNotifier.h:
            * platform/network/android/NetworkStateNotifierAndroid.cpp: Added.
            (WebCore::NetworkStateNotifier::networkStateChange):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52635 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 80541ea..d27e481 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-29  Andrei Popescu  <andreip at google.com>
+
+        Reviewed by Adam Barth.
+
+        Add Android hook to NetworkStateNotifier class
+        so that the Java side can notify WebCore when the
+        network state changes.
+        https://bugs.webkit.org/show_bug.cgi?id=32871
+
+        No new tests required, this is platform code.
+
+        * platform/network/NetworkStateNotifier.h:
+        * platform/network/android/NetworkStateNotifierAndroid.cpp: Added.
+        (WebCore::NetworkStateNotifier::networkStateChange):
+
 2009-12-29  Eric Seidel  <eric at webkit.org>
 
         No review, rolling out r52630.
diff --git a/WebCore/platform/network/NetworkStateNotifier.h b/WebCore/platform/network/NetworkStateNotifier.h
index 24a347d..81dd081 100644
--- a/WebCore/platform/network/NetworkStateNotifier.h
+++ b/WebCore/platform/network/NetworkStateNotifier.h
@@ -85,6 +85,10 @@ private:
 #elif PLATFORM(CHROMIUM)
     NetworkStateNotifierPrivate p;
 
+#elif PLATFORM(ANDROID)
+public:
+    void networkStateChange(bool online);
+
 #elif PLATFORM(QT) && ENABLE(QT_BEARER)
     friend class NetworkStateNotifierPrivate;
     NetworkStateNotifierPrivate* p;
diff --git a/WebCore/platform/network/android/NetworkStateNotifierAndroid.cpp b/WebCore/platform/network/android/NetworkStateNotifierAndroid.cpp
new file mode 100644
index 0000000..cd760bc
--- /dev/null
+++ b/WebCore/platform/network/android/NetworkStateNotifierAndroid.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2009, The Android Open Source Project
+ *
+ * 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"
+
+namespace WebCore {
+
+void NetworkStateNotifier::networkStateChange(bool online)
+{   
+    if (m_isOnLine == online)
+        return;
+    
+    m_isOnLine = online;
+
+    if (m_networkStateChangedFunction)
+        m_networkStateChangedFunction();
+}
+
+}

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list