Unreviewed, rolling out r113734.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2012 19:45:47 +0000 (19:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2012 19:45:47 +0000 (19:45 +0000)
http://trac.webkit.org/changeset/113734
https://bugs.webkit.org/show_bug.cgi?id=83606

causing a bunch of unrelated test failures (Requested by
simonjam on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-04-10

Source/WebCore:

* Modules/battery/BatteryController.cpp:
* Modules/battery/BatteryController.h:
(BatteryController):
* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::charging):
(WebCore::BatteryManager::chargingTime):
(WebCore::BatteryManager::dischargingTime):
(WebCore::BatteryManager::level):
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:

Source/WebKit/chromium:

* WebKit.gyp:
* features.gypi:
* public/WebBatteryStatus.h: Removed.
* public/WebBatteryStatusClient.h: Removed.
* public/WebView.h:
(WebKit):
(WebView):
* public/WebViewClient.h:
(WebKit):
* src/BatteryClientImpl.cpp: Removed.
* src/BatteryClientImpl.h: Removed.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
* src/WebViewImpl.h:
(WebKit):
(WebViewImpl):

LayoutTests:

* platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt:
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113755 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt
LayoutTests/platform/chromium/test_expectations.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/battery/BatteryController.cpp
Source/WebCore/Modules/battery/BatteryController.h
Source/WebCore/Modules/battery/BatteryManager.cpp
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.gypi
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/features.gypi
Source/WebKit/chromium/public/WebBatteryStatus.h [deleted file]
Source/WebKit/chromium/public/WebBatteryStatusClient.h [deleted file]
Source/WebKit/chromium/public/WebView.h
Source/WebKit/chromium/public/WebViewClient.h
Source/WebKit/chromium/src/BatteryClientImpl.cpp [deleted file]
Source/WebKit/chromium/src/BatteryClientImpl.h [deleted file]
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h

index 9e528ec..c109f32 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-10  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r113734.
+        http://trac.webkit.org/changeset/113734
+        https://bugs.webkit.org/show_bug.cgi?id=83606
+
+        causing a bunch of unrelated test failures (Requested by
+        simonjam on #webkit).
+
+        * platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt:
+        * platform/chromium/test_expectations.txt:
+
 2012-04-10  David Barton  <dbarton@mathscribe.com>
 
         msqrt's implied mrow should do operator stretching
index 4c6782d..a4e4395 100644 (file)
@@ -17,7 +17,6 @@ navigator.registerProtocolHandler() threw err TypeError: Not enough arguments
 navigator.userAgent is OK
 navigator.vendor is OK
 navigator.vendorSub is OK
-navigator.webkitBattery is OK
 navigator.webkitGamepads is OK
 navigator.webkitPointer is OK
 navigator.webkitStartActivity() threw err TypeError: Not enough arguments
@@ -38,7 +37,6 @@ navigator.registerProtocolHandler() threw err TypeError: Not enough arguments
 navigator.userAgent is OK
 navigator.vendor is OK
 navigator.vendorSub is OK
-navigator.webkitBattery is OK
 navigator.webkitGamepads is OK
 navigator.webkitPointer is OK
 navigator.webkitStartActivity() threw err TypeError: Not enough arguments
index 0a95798..37f5c59 100644 (file)
@@ -136,6 +136,9 @@ BUGCR103939 SKIP : http/tests/appcache/wrong-content-type.html = TEXT
 // Vibration API is not supported yet in the chromium port.
 BUGWK72010 SKIP : fast/dom/navigator-vibration.html = FAIL
 
+// Battery Status API is not supported yet in the chromium port.
+BUGWK62698 SKIP : batterystatus = PASS FAIL
+
 // Touch Adjustment is not supported yet in the chromium port.
 BUGWK78801 SKIP : touchadjustment/ = FAIL
 
index 92c1b3f..c56d71b 100644 (file)
@@ -1,3 +1,23 @@
+2012-04-10  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r113734.
+        http://trac.webkit.org/changeset/113734
+        https://bugs.webkit.org/show_bug.cgi?id=83606
+
+        causing a bunch of unrelated test failures (Requested by
+        simonjam on #webkit).
+
+        * Modules/battery/BatteryController.cpp:
+        * Modules/battery/BatteryController.h:
+        (BatteryController):
+        * Modules/battery/BatteryManager.cpp:
+        (WebCore::BatteryManager::charging):
+        (WebCore::BatteryManager::chargingTime):
+        (WebCore::BatteryManager::dischargingTime):
+        (WebCore::BatteryManager::level):
+        * WebCore.gyp/WebCore.gyp:
+        * WebCore.gypi:
+
 2012-04-10  Adam Klein  <adamk@chromium.org>
 
         Add setJSWrapperForActiveDOMNode and use it for Nodes that are also ActiveDOMObjects
index 7a7688f..5d192a9 100644 (file)
@@ -1,6 +1,5 @@
 /*
  *  Copyright (C) 2012 Samsung Electronics
- *  Copyright (C) 2012 Google Inc.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
@@ -64,24 +63,6 @@ void BatteryController::removeListener(BatteryManager* batteryManager)
         m_client->stopUpdating();
 }
 
-void BatteryController::updateBatteryStatus(PassRefPtr<BatteryStatus> batteryStatus)
-{
-    RefPtr<BatteryStatus> status = batteryStatus;
-    if (m_batteryStatus) {
-        if (m_batteryStatus->charging() != status->charging())
-            didChangeBatteryStatus(WebCore::eventNames().chargingchangeEvent, status);
-        else if (status->charging() && m_batteryStatus->chargingTime() != status->chargingTime())
-            didChangeBatteryStatus(WebCore::eventNames().chargingtimechangeEvent, status);
-        else if (!status->charging() && m_batteryStatus->dischargingTime() != status->dischargingTime())
-            didChangeBatteryStatus(WebCore::eventNames().dischargingtimechangeEvent, status);
-
-        if (m_batteryStatus->level() != status->level())
-            didChangeBatteryStatus(WebCore::eventNames().levelchangeEvent, status);
-    }
-
-    m_batteryStatus = status.release();
-}
-
 void BatteryController::didChangeBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus> batteryStatus)
 {
     RefPtr<Event> event = Event::create(eventType, false, false);
index 4f1c922..a5d779a 100644 (file)
@@ -1,6 +1,5 @@
 /*
  *  Copyright (C) 2012 Samsung Electronics
- *  Copyright (C) 2012 Google Inc.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
@@ -38,7 +37,6 @@ public:
 
     void addListener(BatteryManager*);
     void removeListener(BatteryManager*);
-    void updateBatteryStatus(PassRefPtr<BatteryStatus>);
     void didChangeBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus>);
 
     BatteryClient* client() const { return m_client; }
@@ -54,8 +52,6 @@ private:
 
     BatteryClient* m_client;
     ListenerVector m_listeners;
-
-    RefPtr<BatteryStatus> m_batteryStatus;
 };
 
 }
index dc2596a..1eabb8e 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "BatteryController.h"
 #include "BatteryStatus.h"
-#include "Document.h"
 #include "Event.h"
 #include "Frame.h"
 #include "Navigator.h"
@@ -53,12 +52,12 @@ BatteryManager::BatteryManager(Navigator* navigator)
 
 bool BatteryManager::charging()
 {
-    return m_batteryStatus ? m_batteryStatus->charging() : true;
+    return m_batteryStatus->charging();
 }
 
 double BatteryManager::chargingTime()
 {
-    if (!m_batteryStatus || !m_batteryStatus->charging())
+    if (!m_batteryStatus->charging())
         return std::numeric_limits<double>::infinity();
 
     return m_batteryStatus->chargingTime();
@@ -66,7 +65,7 @@ double BatteryManager::chargingTime()
 
 double BatteryManager::dischargingTime()
 {
-    if (!m_batteryStatus || m_batteryStatus->charging())
+    if (m_batteryStatus->charging())
         return std::numeric_limits<double>::infinity();
 
     return m_batteryStatus->dischargingTime();
@@ -74,7 +73,7 @@ double BatteryManager::dischargingTime()
 
 double BatteryManager::level()
 {
-    return m_batteryStatus ? m_batteryStatus->level() : 1;
+    return m_batteryStatus->level();
 }
 
 void BatteryManager::didChangeBatteryStatus(PassRefPtr<Event> event, PassRefPtr<BatteryStatus> batteryStatus)
index 968a85a..d76dfed 100644 (file)
@@ -51,7 +51,6 @@
     'webcore_include_dirs': [
       '../',
       '../..',
-      '../Modules/battery',
       '../Modules/filesystem',
       '../Modules/filesystem/chromium',
       '../Modules/gamepad',
index 665df49..f0a91e1 100644 (file)
             'svg/properties/SVGTransformListPropertyTearOff.h',
         ],
         'webcore_bindings_idl_files': [
-            'Modules/battery/BatteryManager.idl',
-            'Modules/battery/NavigatorBattery.idl',
             'Modules/filesystem/DOMFileSystem.idl',
             'Modules/filesystem/DOMFileSystemSync.idl',
             'Modules/filesystem/DOMWindowFileSystem.idl',
             'svg/SVGZoomEvent.idl',
         ],
         'webcore_files': [
-            'Modules/battery/BatteryClient.h',
-            'Modules/battery/BatteryController.cpp',
-            'Modules/battery/BatteryController.h',
-            'Modules/battery/BatteryManager.cpp',
-            'Modules/battery/BatteryManager.h',
-            'Modules/battery/BatteryStatus.cpp',
-            'Modules/battery/BatteryStatus.h',
-            'Modules/battery/NavigatorBattery.cpp',
-            'Modules/battery/NavigatorBattery.h',
             'Modules/filesystem/DOMFilePath.cpp',
             'Modules/filesystem/DOMFilePath.h',
             'Modules/filesystem/DOMFileSystem.cpp',
index edd728d..3eadd00 100644 (file)
@@ -1,3 +1,29 @@
+2012-04-10  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r113734.
+        http://trac.webkit.org/changeset/113734
+        https://bugs.webkit.org/show_bug.cgi?id=83606
+
+        causing a bunch of unrelated test failures (Requested by
+        simonjam on #webkit).
+
+        * WebKit.gyp:
+        * features.gypi:
+        * public/WebBatteryStatus.h: Removed.
+        * public/WebBatteryStatusClient.h: Removed.
+        * public/WebView.h:
+        (WebKit):
+        (WebView):
+        * public/WebViewClient.h:
+        (WebKit):
+        * src/BatteryClientImpl.cpp: Removed.
+        * src/BatteryClientImpl.h: Removed.
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::WebViewImpl):
+        * src/WebViewImpl.h:
+        (WebKit):
+        (WebViewImpl):
+
 2012-04-09  James Robinson  <jamesr@chromium.org>
 
         [chromium] Defer texture id allocation for copies until the actual copy executes
index d6a7f71..68c81e4 100644 (file)
                 'public/WebAudioSourceProvider.h',
                 'public/WebAudioSourceProviderClient.h',
                 'public/WebAutofillClient.h',
-                'public/WebBatteryStatus.h',
-                'public/WebBatteryStatusClient.h',
                 'public/WebBindings.h',
                 'public/WebBlob.h',
                 'public/WebCache.h',
                 'src/AutofillPopupMenuClient.h',
                 'src/BackForwardListChromium.cpp',
                 'src/BackForwardListChromium.h',
-                'src/BatteryClientImpl.cpp',
-                'src/BatteryClientImpl.h',
                 'src/BlobRegistryProxy.cpp',
                 'src/BlobRegistryProxy.h',
                 'src/CCThreadImpl.cpp',
index 4504ce2..e9e2dee 100644 (file)
@@ -33,7 +33,6 @@
   'variables': {
     'feature_defines': [
       'ENABLE_3D_PLUGIN=1',
-      'ENABLE_BATTERY_STATUS=1',
       'ENABLE_BLOB=1',
       'ENABLE_BLOB_SLICE=1',
       'ENABLE_CHANNEL_MESSAGING=1',
diff --git a/Source/WebKit/chromium/public/WebBatteryStatus.h b/Source/WebKit/chromium/public/WebBatteryStatus.h
deleted file mode 100644 (file)
index b1cf486..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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 APPLE AND ITS CONTRIBUTORS "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 APPLE OR ITS 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.
- */
-
-#ifndef WebBatteryStatus_h
-#define WebBatteryStatus_h
-
-#include "platform/WebCommon.h"
-
-namespace WebKit {
-
-class WebBatteryStatus {
-public:
-    WebBatteryStatus()
-        : charging(true)
-        , chargingTime(0.0)
-        , dischargingTime(0.0)
-        , level(0.0)
-    {
-    }
-
-    bool charging;
-    double chargingTime;
-    double dischargingTime;
-    double level;
-};
-
-} // namespace WebKit
-
-#endif // WebBatteryStatus_h
diff --git a/Source/WebKit/chromium/public/WebBatteryStatusClient.h b/Source/WebKit/chromium/public/WebBatteryStatusClient.h
deleted file mode 100644 (file)
index 1a2a15b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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 APPLE AND ITS CONTRIBUTORS "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 APPLE OR ITS 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.
- */
-
-#ifndef WebBatteryStatusClient_h
-#define WebBatteryStatusClient_h
-
-namespace WebKit {
-
-class WebBatteryStatusClient {
-public:
-    virtual ~WebBatteryStatusClient() { }
-
-    virtual void startUpdating() = 0;
-    virtual void stopUpdating() = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebBatteryStatusClient_h
index 1dfa3a6..729f516 100644 (file)
@@ -41,7 +41,6 @@ namespace WebKit {
 
 class WebAccessibilityObject;
 class WebAutofillClient;
-class WebBatteryStatus;
 class WebDevToolsAgent;
 class WebDevToolsAgentClient;
 class WebDragData;
@@ -455,13 +454,6 @@ public:
     virtual void addPageOverlay(WebPageOverlay*, int /*z-order*/) = 0;
     virtual void removePageOverlay(WebPageOverlay*) = 0;
 
-    // Battery status API support -------------------------------------------
-
-    // Updates the battery status in the BatteryClient. This also triggers the
-    // appropriate JS events (e.g. sends a 'levelchange' event to JS if the
-    // level is changed in this update from the previous update).
-    virtual void updateBatteryStatus(const WebBatteryStatus&) { }
-
     // Testing functionality for LayoutTestController -----------------------
 
     // Simulates a compositor lost context.
index c4a5e40..b8fe9d0 100644 (file)
@@ -48,7 +48,6 @@
 namespace WebKit {
 
 class WebAccessibilityObject;
-class WebBatteryStatusClient;
 class WebColorChooser;
 class WebColorChooserClient;
 class WebDeviceOrientationClient;
@@ -326,10 +325,6 @@ public:
     // Access the embedder API for device orientation services.
     virtual WebDeviceOrientationClient* deviceOrientationClient() { return 0; }
 
-    // Battery Status ------------------------------------------------------
-
-    // Access the embedder API for battery status services.
-    virtual WebBatteryStatusClient* batteryStatusClient() { return 0; }
 
     // Zoom ----------------------------------------------------------------
 
diff --git a/Source/WebKit/chromium/src/BatteryClientImpl.cpp b/Source/WebKit/chromium/src/BatteryClientImpl.cpp
deleted file mode 100644 (file)
index 136c912..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. 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.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "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 "BatteryClientImpl.h"
-
-#if ENABLE(BATTERY_STATUS)
-
-#include "BatteryController.h"
-#include "BatteryStatus.h"
-#include "EventNames.h"
-#include "WebBatteryStatusClient.h"
-#include <wtf/RefPtr.h>
-
-namespace WebKit {
-
-BatteryClientImpl::BatteryClientImpl(WebBatteryStatusClient* client)
-    : m_client(client)
-    , m_controller(0)
-{
-}
-
-void BatteryClientImpl::updateBatteryStatus(const WebBatteryStatus& batteryStatus)
-{
-    if (m_controller) {
-        RefPtr<WebCore::BatteryStatus> status = WebCore::BatteryStatus::create(batteryStatus.charging, batteryStatus.chargingTime, batteryStatus.dischargingTime, batteryStatus.level);
-        m_controller->updateBatteryStatus(status);
-    }
-}
-
-void BatteryClientImpl::setController(WebCore::BatteryController* controller)
-{
-    m_controller = controller;
-}
-
-void BatteryClientImpl::startUpdating()
-{
-    if (m_client)
-        m_client->startUpdating();
-}
-
-void BatteryClientImpl::stopUpdating()
-{
-    if (m_client)
-        m_client->stopUpdating();
-}
-
-void BatteryClientImpl::batteryControllerDestroyed()
-{
-    m_controller = 0;
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(BATTERY_STATUS)
diff --git a/Source/WebKit/chromium/src/BatteryClientImpl.h b/Source/WebKit/chromium/src/BatteryClientImpl.h
deleted file mode 100644 (file)
index a3b1fa5..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. 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.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "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.
- */
-
-#ifndef BatteryClientImpl_h
-#define BatteryClientImpl_h
-
-#if ENABLE(BATTERY_STATUS)
-
-#include "BatteryClient.h"
-#include "WebBatteryStatus.h"
-
-namespace WebKit {
-
-class WebBatteryStatusClient;
-
-class BatteryClientImpl : public WebCore::BatteryClient {
-public:
-    explicit BatteryClientImpl(WebBatteryStatusClient*);
-    virtual ~BatteryClientImpl() { }
-
-    void updateBatteryStatus(const WebBatteryStatus&);
-
-    // WebCore::BatteryClient methods:
-    virtual void setController(WebCore::BatteryController*) OVERRIDE;
-    virtual void startUpdating() OVERRIDE;
-    virtual void stopUpdating() OVERRIDE;
-    virtual void batteryControllerDestroyed() OVERRIDE;
-
-private:
-    WebBatteryStatusClient* m_client;
-    WebCore::BatteryController* m_controller;
-};
-
-} // namespce WebKit
-
-#endif // ENABLE(BATTERY_STATUS)
-
-#endif // BatteryClientImpl_h
index 943f42e..63ebfa0 100644 (file)
@@ -35,7 +35,6 @@
 #include "ActivePlatformGestureAnimation.h"
 #include "AutofillPopupMenuClient.h"
 #include "BackForwardListChromium.h"
-#include "BatteryClientImpl.h"
 #include "CSSStyleSelector.h"
 #include "CSSValueKeywords.h"
 #include "Chrome.h"
@@ -387,9 +386,6 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
 #endif
     , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0)))
     , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? client->geolocationClient() : 0)))
-#if ENABLE(BATTERY_STATUS)
-    , m_batteryClient(adoptPtr(new BatteryClientImpl(client ? client->batteryStatusClient() : 0)))
-#endif
     , m_emulatedTextZoomFactor(1)
 #if ENABLE(MEDIA_STREAM)
     , m_userMediaClientImpl(this)
@@ -427,10 +423,6 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
     provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get());
     provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get());
     m_geolocationClientProxy->setController(GeolocationController::from(m_page.get()));
-
-#if ENABLE(BATTERY_STATUS)
-    provideBatteryTo(m_page.get(), m_batteryClient.get());
-#endif
     
     m_page->setGroupName(pageGroupName);
 
@@ -1381,13 +1373,6 @@ void WebViewImpl::instrumentCancelFrame()
     InspectorInstrumentation::didCancelFrame(m_page.get());
 }
 
-#if ENABLE(BATTERY_STATUS)
-void WebViewImpl::updateBatteryStatus(const WebBatteryStatus& status)
-{
-    m_batteryClient->updateBatteryStatus(status);
-}
-#endif
-
 void WebViewImpl::animate(double)
 {
 #if ENABLE(REQUEST_ANIMATION_FRAME)
index 02f62ce..634a41b 100644 (file)
@@ -81,7 +81,6 @@ class Widget;
 namespace WebKit {
 class AutocompletePopupMenuClient;
 class AutofillPopupMenuClient;
-class BatteryClientImpl;
 class ContextMenuClientImpl;
 class DeviceOrientationClientProxy;
 class DragScrollTimer;
@@ -258,9 +257,6 @@ public:
     virtual void performCustomContextMenuAction(unsigned action);
     virtual void addPageOverlay(WebPageOverlay*, int /* zOrder */);
     virtual void removePageOverlay(WebPageOverlay*);
-#if ENABLE(BATTERY_STATUS)
-    virtual void updateBatteryStatus(const WebBatteryStatus&);
-#endif
     virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters&);
 
     // WebLayerTreeViewClient
@@ -753,9 +749,6 @@ private:
     OwnPtr<WebGraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
     OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
     OwnPtr<GeolocationClientProxy> m_geolocationClientProxy;
-#if ENABLE(BATTERY_STATUS)
-    OwnPtr<BatteryClientImpl> m_batteryClient;
-#endif
 
     float m_emulatedTextZoomFactor;