Title: [160437] trunk/Source/WebKit/gtk
- Revision
- 160437
- Author
- [email protected]
- Date
- 2013-12-11 08:46:18 -0800 (Wed, 11 Dec 2013)
Log Message
[GTK][WK1] Add an empty BatteryClientGtk
https://bugs.webkit.org/show_bug.cgi?id=115628
Reviewed by Martin Robinson.
Add an empty BatteryClientGtk, implementing the WebCore's BatteryClient interface.
The implementation is left empty intentionally as the WebKit1 port is now in maintenance
mode and there's no desire to support new features under it. It's still required as the
WebCore implementation of the Battery Status API expects an existing BatteryClient, even
if the latter does not set up a provider that would then serve information about the battery
state.
* GNUmakefile.am: Add the BatteryClientGtk source files to the build.
* WebCoreSupport/BatteryClientGtk.cpp: Added.
(WebKit):
(WebKit::BatteryClientGtk::BatteryClientGtk):
(WebKit::BatteryClientGtk::startUpdating):
(WebKit::BatteryClientGtk::stopUpdating):
(WebKit::BatteryClientGtk::batteryControllerDestroyed):
* WebCoreSupport/BatteryClientGtk.h: Added.
(WebKit):
(BatteryClientGtk):
* webkit/webkitwebview.cpp:
(webkit_web_view_init): Set up the BatteryClientGtk for the new WebCore::Page object.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebKit/gtk/ChangeLog (160436 => 160437)
--- trunk/Source/WebKit/gtk/ChangeLog 2013-12-11 16:43:08 UTC (rev 160436)
+++ trunk/Source/WebKit/gtk/ChangeLog 2013-12-11 16:46:18 UTC (rev 160437)
@@ -1,3 +1,30 @@
+2013-12-11 José Dapena Paz <[email protected]> and Zan Dobersek <[email protected]>
+
+ [GTK][WK1] Add an empty BatteryClientGtk
+ https://bugs.webkit.org/show_bug.cgi?id=115628
+
+ Reviewed by Martin Robinson.
+
+ Add an empty BatteryClientGtk, implementing the WebCore's BatteryClient interface.
+ The implementation is left empty intentionally as the WebKit1 port is now in maintenance
+ mode and there's no desire to support new features under it. It's still required as the
+ WebCore implementation of the Battery Status API expects an existing BatteryClient, even
+ if the latter does not set up a provider that would then serve information about the battery
+ state.
+
+ * GNUmakefile.am: Add the BatteryClientGtk source files to the build.
+ * WebCoreSupport/BatteryClientGtk.cpp: Added.
+ (WebKit):
+ (WebKit::BatteryClientGtk::BatteryClientGtk):
+ (WebKit::BatteryClientGtk::startUpdating):
+ (WebKit::BatteryClientGtk::stopUpdating):
+ (WebKit::BatteryClientGtk::batteryControllerDestroyed):
+ * WebCoreSupport/BatteryClientGtk.h: Added.
+ (WebKit):
+ (BatteryClientGtk):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init): Set up the BatteryClientGtk for the new WebCore::Page object.
+
2013-12-11 Brendan Long <[email protected]>
[GTK] Add "enable-mediasource" property to WebKitWebSettings
Modified: trunk/Source/WebKit/gtk/GNUmakefile.am (160436 => 160437)
--- trunk/Source/WebKit/gtk/GNUmakefile.am 2013-12-11 16:43:08 UTC (rev 160436)
+++ trunk/Source/WebKit/gtk/GNUmakefile.am 2013-12-11 16:46:18 UTC (rev 160437)
@@ -192,6 +192,8 @@
Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h \
Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp \
Source/WebKit/gtk/WebCoreSupport/AssertMatchingEnums.cpp \
+ Source/WebKit/gtk/WebCoreSupport/BatteryClientGtk.cpp \
+ Source/WebKit/gtk/WebCoreSupport/BatteryClientGtk.h \
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
Added: trunk/Source/WebKit/gtk/WebCoreSupport/BatteryClientGtk.cpp (0 => 160437)
--- trunk/Source/WebKit/gtk/WebCoreSupport/BatteryClientGtk.cpp (rev 0)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/BatteryClientGtk.cpp 2013-12-11 16:46:18 UTC (rev 160437)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "BatteryClientGtk.h"
+
+#if ENABLE(BATTERY_STATUS)
+
+#include "NotImplemented.h"
+
+namespace WebKit {
+
+BatteryClientGtk::BatteryClientGtk()
+{
+}
+
+void BatteryClientGtk::startUpdating()
+{
+ notImplemented();
+}
+
+void BatteryClientGtk::stopUpdating()
+{
+ notImplemented();
+}
+
+void BatteryClientGtk::batteryControllerDestroyed()
+{
+ notImplemented();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(BATTERY_STATUS)
Added: trunk/Source/WebKit/gtk/WebCoreSupport/BatteryClientGtk.h (0 => 160437)
--- trunk/Source/WebKit/gtk/WebCoreSupport/BatteryClientGtk.h (rev 0)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/BatteryClientGtk.h 2013-12-11 16:46:18 UTC (rev 160437)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef BatteryClientGtk_h
+#define BatteryClientGtk_h
+
+#if ENABLE(BATTERY_STATUS)
+
+#include "BatteryClient.h"
+
+namespace WebKit {
+
+class BatteryClientGtk : public WebCore::BatteryClient {
+public:
+ BatteryClientGtk();
+
+ // WebCore::BatteryClient
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual void batteryControllerDestroyed();
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(BATTERY_STATUS)
+
+#endif // BatteryClientGtk_h
Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (160436 => 160437)
--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2013-12-11 16:43:08 UTC (rev 160436)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2013-12-11 16:46:18 UTC (rev 160437)
@@ -35,6 +35,7 @@
#include "AXObjectCache.h"
#include "ArchiveResource.h"
#include "BackForwardList.h"
+#include "BatteryClientGtk.h"
#include "CairoUtilities.h"
#include "Chrome.h"
#include "ChromeClientGtk.h"
@@ -3837,6 +3838,10 @@
WebCore::provideNavigatorContentUtilsTo(priv->corePage, priv->navigatorContentUtilsClient.get());
#endif
+#if ENABLE(BATTERY_STATUS)
+ WebCore::provideBatteryTo(priv->corePage, new BatteryClientGtk);
+#endif
+
if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled()) {
// Set some testing-specific settings
priv->corePage->settings().setInteractiveFormValidationEnabled(true);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes