summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/chromium/public
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-13 16:23:25 +0100
committerBen Murdoch <benm@google.com>2011-05-16 11:35:02 +0100
commit65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch)
treef478babb801e720de7bfaee23443ffe029f58731 /Source/WebKit/chromium/public
parent47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff)
downloadexternal_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebKit/chromium/public')
-rw-r--r--Source/WebKit/chromium/public/WebAccessibilityCache.h63
-rw-r--r--Source/WebKit/chromium/public/WebAccessibilityNotification.h57
-rw-r--r--Source/WebKit/chromium/public/WebAccessibilityObject.h134
-rw-r--r--Source/WebKit/chromium/public/WebAccessibilityRole.h146
-rw-r--r--Source/WebKit/chromium/public/WebAnimationController.h63
-rw-r--r--Source/WebKit/chromium/public/WebApplicationCacheHost.h121
-rw-r--r--Source/WebKit/chromium/public/WebApplicationCacheHostClient.h57
-rw-r--r--Source/WebKit/chromium/public/WebAttribute.h74
-rw-r--r--Source/WebKit/chromium/public/WebAudioBus.h75
-rw-r--r--Source/WebKit/chromium/public/WebAudioDevice.h55
-rw-r--r--Source/WebKit/chromium/public/WebAutoFillClient.h90
-rw-r--r--Source/WebKit/chromium/public/WebBindings.h164
-rw-r--r--Source/WebKit/chromium/public/WebBlobData.h94
-rw-r--r--Source/WebKit/chromium/public/WebBlobRegistry.h58
-rw-r--r--Source/WebKit/chromium/public/WebCString.h136
-rw-r--r--Source/WebKit/chromium/public/WebCache.h89
-rw-r--r--Source/WebKit/chromium/public/WebCanvas.h54
-rw-r--r--Source/WebKit/chromium/public/WebClipboard.h96
-rw-r--r--Source/WebKit/chromium/public/WebColor.h46
-rw-r--r--Source/WebKit/chromium/public/WebColorName.h71
-rw-r--r--Source/WebKit/chromium/public/WebCommon.h119
-rw-r--r--Source/WebKit/chromium/public/WebCommonWorkerClient.h107
-rw-r--r--Source/WebKit/chromium/public/WebCompositionUnderline.h61
-rw-r--r--Source/WebKit/chromium/public/WebConsoleMessage.h58
-rw-r--r--Source/WebKit/chromium/public/WebContextMenuData.h160
-rw-r--r--Source/WebKit/chromium/public/WebCookie.h77
-rw-r--r--Source/WebKit/chromium/public/WebCookieJar.h56
-rw-r--r--Source/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h50
-rw-r--r--Source/WebKit/chromium/public/WebCursorInfo.h121
-rw-r--r--Source/WebKit/chromium/public/WebDOMEvent.h132
-rw-r--r--Source/WebKit/chromium/public/WebDOMEventListener.h68
-rw-r--r--Source/WebKit/chromium/public/WebDOMMouseEvent.h62
-rw-r--r--Source/WebKit/chromium/public/WebDOMMutationEvent.h58
-rw-r--r--Source/WebKit/chromium/public/WebDOMStringList.h76
-rw-r--r--Source/WebKit/chromium/public/WebData.h110
-rw-r--r--Source/WebKit/chromium/public/WebDataSource.h108
-rw-r--r--Source/WebKit/chromium/public/WebDatabase.h71
-rw-r--r--Source/WebKit/chromium/public/WebDatabaseObserver.h48
-rw-r--r--Source/WebKit/chromium/public/WebDevToolsAgent.h112
-rw-r--r--Source/WebKit/chromium/public/WebDevToolsAgentClient.h71
-rw-r--r--Source/WebKit/chromium/public/WebDevToolsFrontend.h57
-rw-r--r--Source/WebKit/chromium/public/WebDevToolsFrontendClient.h61
-rw-r--r--Source/WebKit/chromium/public/WebDeviceOrientation.h88
-rw-r--r--Source/WebKit/chromium/public/WebDeviceOrientationClient.h47
-rw-r--r--Source/WebKit/chromium/public/WebDeviceOrientationClientMock.h59
-rw-r--r--Source/WebKit/chromium/public/WebDeviceOrientationController.h56
-rw-r--r--Source/WebKit/chromium/public/WebDocument.h92
-rw-r--r--Source/WebKit/chromium/public/WebDocumentType.h68
-rw-r--r--Source/WebKit/chromium/public/WebDragData.h115
-rw-r--r--Source/WebKit/chromium/public/WebDragOperation.h59
-rw-r--r--Source/WebKit/chromium/public/WebEditingAction.h44
-rw-r--r--Source/WebKit/chromium/public/WebElement.h77
-rw-r--r--Source/WebKit/chromium/public/WebExceptionCode.h41
-rw-r--r--Source/WebKit/chromium/public/WebExternalPopupMenu.h46
-rw-r--r--Source/WebKit/chromium/public/WebExternalPopupMenuClient.h56
-rw-r--r--Source/WebKit/chromium/public/WebFileChooserCompletion.h52
-rw-r--r--Source/WebKit/chromium/public/WebFileChooserParams.h72
-rw-r--r--Source/WebKit/chromium/public/WebFileError.h53
-rw-r--r--Source/WebKit/chromium/public/WebFileInfo.h58
-rw-r--r--Source/WebKit/chromium/public/WebFileSystem.h121
-rw-r--r--Source/WebKit/chromium/public/WebFileSystemCallbacks.h73
-rw-r--r--Source/WebKit/chromium/public/WebFileSystemEntry.h50
-rw-r--r--Source/WebKit/chromium/public/WebFileUtilities.h77
-rw-r--r--Source/WebKit/chromium/public/WebFileWriter.h57
-rw-r--r--Source/WebKit/chromium/public/WebFileWriterClient.h57
-rw-r--r--Source/WebKit/chromium/public/WebFindOptions.h57
-rw-r--r--Source/WebKit/chromium/public/WebFloatPoint.h91
-rw-r--r--Source/WebKit/chromium/public/WebFloatRect.h103
-rw-r--r--Source/WebKit/chromium/public/WebFont.h100
-rw-r--r--Source/WebKit/chromium/public/WebFontCache.h56
-rw-r--r--Source/WebKit/chromium/public/WebFontDescription.h106
-rw-r--r--Source/WebKit/chromium/public/WebFormControlElement.h74
-rw-r--r--Source/WebKit/chromium/public/WebFormElement.h81
-rw-r--r--Source/WebKit/chromium/public/WebFrame.h579
-rw-r--r--Source/WebKit/chromium/public/WebFrameClient.h371
-rw-r--r--Source/WebKit/chromium/public/WebGeolocationClient.h54
-rw-r--r--Source/WebKit/chromium/public/WebGeolocationClientMock.h76
-rw-r--r--Source/WebKit/chromium/public/WebGeolocationController.h65
-rw-r--r--Source/WebKit/chromium/public/WebGeolocationError.h69
-rw-r--r--Source/WebKit/chromium/public/WebGeolocationPermissionRequest.h63
-rw-r--r--Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h63
-rw-r--r--Source/WebKit/chromium/public/WebGeolocationPosition.h66
-rw-r--r--Source/WebKit/chromium/public/WebGlyphCache.h51
-rw-r--r--Source/WebKit/chromium/public/WebGraphicsContext3D.h331
-rw-r--r--Source/WebKit/chromium/public/WebHTTPBody.h109
-rw-r--r--Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h48
-rw-r--r--Source/WebKit/chromium/public/WebHTTPLoadInfo.h79
-rw-r--r--Source/WebKit/chromium/public/WebHistoryItem.h137
-rw-r--r--Source/WebKit/chromium/public/WebIDBCallbacks.h61
-rw-r--r--Source/WebKit/chromium/public/WebIDBCursor.h68
-rw-r--r--Source/WebKit/chromium/public/WebIDBDatabase.h81
-rw-r--r--Source/WebKit/chromium/public/WebIDBDatabaseError.h73
-rwxr-xr-xSource/WebKit/chromium/public/WebIDBFactory.h63
-rw-r--r--Source/WebKit/chromium/public/WebIDBIndex.h76
-rw-r--r--Source/WebKit/chromium/public/WebIDBKey.h94
-rw-r--r--Source/WebKit/chromium/public/WebIDBKeyPath.h68
-rw-r--r--Source/WebKit/chromium/public/WebIDBKeyRange.h67
-rwxr-xr-xSource/WebKit/chromium/public/WebIDBObjectStore.h85
-rw-r--r--Source/WebKit/chromium/public/WebIDBTransaction.h70
-rw-r--r--Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h43
-rw-r--r--Source/WebKit/chromium/public/WebImage.h126
-rw-r--r--Source/WebKit/chromium/public/WebImageDecoder.h90
-rw-r--r--Source/WebKit/chromium/public/WebInputElement.h95
-rw-r--r--Source/WebKit/chromium/public/WebInputEvent.h312
-rw-r--r--Source/WebKit/chromium/public/WebKit.h67
-rw-r--r--Source/WebKit/chromium/public/WebKitClient.h296
-rw-r--r--Source/WebKit/chromium/public/WebLabelElement.h68
-rw-r--r--Source/WebKit/chromium/public/WebLocalizedString.h81
-rw-r--r--Source/WebKit/chromium/public/WebMediaElement.h56
-rw-r--r--Source/WebKit/chromium/public/WebMediaPlayer.h147
-rw-r--r--Source/WebKit/chromium/public/WebMediaPlayerAction.h56
-rw-r--r--Source/WebKit/chromium/public/WebMediaPlayerClient.h59
-rw-r--r--Source/WebKit/chromium/public/WebMenuItemInfo.h65
-rw-r--r--Source/WebKit/chromium/public/WebMessagePortChannel.h62
-rw-r--r--Source/WebKit/chromium/public/WebMessagePortChannelClient.h51
-rw-r--r--Source/WebKit/chromium/public/WebMimeRegistry.h61
-rw-r--r--Source/WebKit/chromium/public/WebNamedNodeMap.h74
-rw-r--r--Source/WebKit/chromium/public/WebNavigationPolicy.h48
-rw-r--r--Source/WebKit/chromium/public/WebNavigationType.h47
-rw-r--r--Source/WebKit/chromium/public/WebNode.h164
-rw-r--r--Source/WebKit/chromium/public/WebNodeCollection.h75
-rw-r--r--Source/WebKit/chromium/public/WebNodeList.h74
-rw-r--r--Source/WebKit/chromium/public/WebNonCopyable.h49
-rw-r--r--Source/WebKit/chromium/public/WebNotification.h131
-rw-r--r--Source/WebKit/chromium/public/WebNotificationPermissionCallback.h51
-rw-r--r--Source/WebKit/chromium/public/WebNotificationPresenter.h74
-rw-r--r--Source/WebKit/chromium/public/WebOptionElement.h75
-rw-r--r--Source/WebKit/chromium/public/WebPageSerializer.h85
-rw-r--r--Source/WebKit/chromium/public/WebPageSerializerClient.h75
-rw-r--r--Source/WebKit/chromium/public/WebPasswordAutocompleteListener.h52
-rw-r--r--Source/WebKit/chromium/public/WebPasswordFormData.h110
-rw-r--r--Source/WebKit/chromium/public/WebPerformance.h96
-rw-r--r--Source/WebKit/chromium/public/WebPlugin.h130
-rw-r--r--Source/WebKit/chromium/public/WebPluginContainer.h97
-rw-r--r--Source/WebKit/chromium/public/WebPluginDocument.h67
-rw-r--r--Source/WebKit/chromium/public/WebPluginListBuilder.h54
-rw-r--r--Source/WebKit/chromium/public/WebPluginParams.h50
-rw-r--r--Source/WebKit/chromium/public/WebPoint.h111
-rw-r--r--Source/WebKit/chromium/public/WebPopupMenu.h48
-rw-r--r--Source/WebKit/chromium/public/WebPopupMenuInfo.h52
-rw-r--r--Source/WebKit/chromium/public/WebPopupType.h44
-rw-r--r--Source/WebKit/chromium/public/WebPrivateOwnPtr.h75
-rw-r--r--Source/WebKit/chromium/public/WebPrivatePtr.h105
-rw-r--r--Source/WebKit/chromium/public/WebRange.h86
-rw-r--r--Source/WebKit/chromium/public/WebRect.h127
-rw-r--r--Source/WebKit/chromium/public/WebRegularExpression.h56
-rw-r--r--Source/WebKit/chromium/public/WebRuntimeFeatures.h101
-rw-r--r--Source/WebKit/chromium/public/WebScreenInfo.h74
-rw-r--r--Source/WebKit/chromium/public/WebScriptController.h71
-rw-r--r--Source/WebKit/chromium/public/WebScriptSource.h54
-rw-r--r--Source/WebKit/chromium/public/WebScrollbar.h98
-rw-r--r--Source/WebKit/chromium/public/WebScrollbarClient.h49
-rw-r--r--Source/WebKit/chromium/public/WebSearchableFormData.h69
-rw-r--r--Source/WebKit/chromium/public/WebSecurityOrigin.h113
-rw-r--r--Source/WebKit/chromium/public/WebSecurityPolicy.h82
-rw-r--r--Source/WebKit/chromium/public/WebSelectElement.h70
-rw-r--r--Source/WebKit/chromium/public/WebSerializedScriptValue.h79
-rw-r--r--Source/WebKit/chromium/public/WebSettings.h113
-rw-r--r--Source/WebKit/chromium/public/WebSharedWorker.h84
-rw-r--r--Source/WebKit/chromium/public/WebSharedWorkerRepository.h59
-rw-r--r--Source/WebKit/chromium/public/WebSize.h113
-rw-r--r--Source/WebKit/chromium/public/WebSocketStreamError.h45
-rw-r--r--Source/WebKit/chromium/public/WebSocketStreamHandle.h58
-rw-r--r--Source/WebKit/chromium/public/WebSocketStreamHandleClient.h66
-rw-r--r--Source/WebKit/chromium/public/WebSpeechInputController.h71
-rw-r--r--Source/WebKit/chromium/public/WebSpeechInputControllerMock.h54
-rw-r--r--Source/WebKit/chromium/public/WebSpeechInputListener.h72
-rw-r--r--Source/WebKit/chromium/public/WebSpeechInputResult.h63
-rw-r--r--Source/WebKit/chromium/public/WebStorageArea.h90
-rw-r--r--Source/WebKit/chromium/public/WebStorageEventDispatcher.h56
-rw-r--r--Source/WebKit/chromium/public/WebStorageNamespace.h80
-rw-r--r--Source/WebKit/chromium/public/WebString.h177
-rw-r--r--Source/WebKit/chromium/public/WebTextAffinity.h44
-rw-r--r--Source/WebKit/chromium/public/WebTextCaseSensitivity.h44
-rw-r--r--Source/WebKit/chromium/public/WebTextDirection.h45
-rw-r--r--Source/WebKit/chromium/public/WebTextInputType.h53
-rw-r--r--Source/WebKit/chromium/public/WebTextRun.h68
-rwxr-xr-xSource/WebKit/chromium/public/WebThreadSafeData.h77
-rw-r--r--Source/WebKit/chromium/public/WebTouchPoint.h62
-rw-r--r--Source/WebKit/chromium/public/WebURL.h148
-rw-r--r--Source/WebKit/chromium/public/WebURLError.h69
-rw-r--r--Source/WebKit/chromium/public/WebURLLoadTiming.h108
-rw-r--r--Source/WebKit/chromium/public/WebURLLoader.h71
-rw-r--r--Source/WebKit/chromium/public/WebURLLoaderClient.h78
-rw-r--r--Source/WebKit/chromium/public/WebURLRequest.h180
-rw-r--r--Source/WebKit/chromium/public/WebURLResponse.h181
-rw-r--r--Source/WebKit/chromium/public/WebVector.h177
-rw-r--r--Source/WebKit/chromium/public/WebVideoFrame.h71
-rw-r--r--Source/WebKit/chromium/public/WebView.h373
-rw-r--r--Source/WebKit/chromium/public/WebViewClient.h331
-rw-r--r--Source/WebKit/chromium/public/WebWidget.h138
-rw-r--r--Source/WebKit/chromium/public/WebWidgetClient.h102
-rw-r--r--Source/WebKit/chromium/public/WebWindowFeatures.h108
-rw-r--r--Source/WebKit/chromium/public/WebWorker.h62
-rw-r--r--Source/WebKit/chromium/public/WebWorkerClient.h61
-rw-r--r--Source/WebKit/chromium/public/gtk/WebFontInfo.h69
-rw-r--r--Source/WebKit/chromium/public/gtk/WebInputEventFactory.h60
-rw-r--r--Source/WebKit/chromium/public/linux/WebFontRenderStyle.h62
-rw-r--r--Source/WebKit/chromium/public/linux/WebFontRendering.h53
-rw-r--r--Source/WebKit/chromium/public/linux/WebRenderTheme.h43
-rw-r--r--Source/WebKit/chromium/public/linux/WebSandboxSupport.h59
-rw-r--r--Source/WebKit/chromium/public/linux/WebThemeEngine.h150
-rw-r--r--Source/WebKit/chromium/public/mac/WebInputEventFactory.h60
-rw-r--r--Source/WebKit/chromium/public/mac/WebSandboxSupport.h63
-rw-r--r--Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h53
-rw-r--r--Source/WebKit/chromium/public/mac/WebThemeEngine.h78
-rw-r--r--Source/WebKit/chromium/public/win/WebInputEventFactory.h61
-rw-r--r--Source/WebKit/chromium/public/win/WebSandboxSupport.h52
-rw-r--r--Source/WebKit/chromium/public/win/WebScreenInfoFactory.h49
-rw-r--r--Source/WebKit/chromium/public/win/WebThemeEngine.h90
-rw-r--r--Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h49
211 files changed, 18619 insertions, 0 deletions
diff --git a/Source/WebKit/chromium/public/WebAccessibilityCache.h b/Source/WebKit/chromium/public/WebAccessibilityCache.h
new file mode 100644
index 0000000..bb2fc7b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAccessibilityCache.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2009 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 WebAccessibilityCache_h
+#define WebAccessibilityCache_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebView;
+class WebAccessibilityObject;
+
+class WebAccessibilityCache {
+public:
+ WebAccessibilityCache() {}
+ virtual ~WebAccessibilityCache() {}
+
+ WEBKIT_API static WebAccessibilityCache* create();
+ WEBKIT_API static void enableAccessibility();
+ WEBKIT_API static bool accessibilityEnabled();
+
+ virtual void initialize(WebView* view) = 0;
+ virtual bool isInitialized() const = 0;
+
+ virtual WebAccessibilityObject getObjectById(int) = 0;
+ virtual int addOrGetId(const WebAccessibilityObject& object) = 0;
+ virtual bool isCached(const WebAccessibilityObject&) = 0;
+
+ virtual void remove(int) = 0;
+ virtual void clear() = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebAccessibilityNotification.h b/Source/WebKit/chromium/public/WebAccessibilityNotification.h
new file mode 100644
index 0000000..c4a9551
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAccessibilityNotification.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 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 WebAccessibilityNotification_h
+#define WebAccessibilityNotification_h
+
+namespace WebKit {
+
+enum WebAccessibilityNotification {
+ WebAccessibilityNotificationActiveDescendantChanged,
+ WebAccessibilityNotificationCheckedStateChanged,
+ WebAccessibilityNotificationChildrenChanged,
+ WebAccessibilityNotificationFocusedUIElementChanged,
+ WebAccessibilityNotificationLayoutComplete,
+ WebAccessibilityNotificationLoadComplete,
+ WebAccessibilityNotificationSelectedChildrenChanged,
+ WebAccessibilityNotificationSelectedTextChanged,
+ WebAccessibilityNotificationValueChanged,
+ WebAccessibilityNotificationScrolledToAnchor,
+ WebAccessibilityNotificationLiveRegionChanged,
+ WebAccessibilityNotificationMenuListValueChanged,
+ WebAccessibilityNotificationRowCountChanged,
+ WebAccessibilityNotificationRowCollapsed,
+ WebAccessibilityNotificationRowExpanded,
+ WebAccessibilityNotificationInvalid
+};
+
+} // namespace WebKit
+
+#endif // WebAccessibilityNotification_h
diff --git a/Source/WebKit/chromium/public/WebAccessibilityObject.h b/Source/WebKit/chromium/public/WebAccessibilityObject.h
new file mode 100644
index 0000000..182d124
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAccessibilityObject.h
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2009 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 WebAccessibilityObject_h
+#define WebAccessibilityObject_h
+
+#include "WebAccessibilityRole.h"
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class AccessibilityObject; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebAccessibilityObjectPrivate;
+class WebNode;
+class WebDocument;
+class WebString;
+class WebURL;
+struct WebPoint;
+struct WebRect;
+
+// A container for passing around a reference to AccessibilityObject.
+class WebAccessibilityObject {
+public:
+ ~WebAccessibilityObject() { reset(); }
+
+ WebAccessibilityObject() : m_private(0) { }
+ WebAccessibilityObject(const WebAccessibilityObject& o) : m_private(0) { assign(o); }
+ WebAccessibilityObject& operator=(const WebAccessibilityObject& o)
+ {
+ assign(o);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebAccessibilityObject&);
+
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebString accessibilityDescription() const;
+ WEBKIT_API WebString actionVerb() const;
+ WEBKIT_API bool canSetFocusAttribute() const;
+ WEBKIT_API bool canSetValueAttribute() const;
+ WEBKIT_API bool isValid() const;
+
+ WEBKIT_API unsigned childCount() const;
+
+ WEBKIT_API WebAccessibilityObject childAt(unsigned) const;
+ WEBKIT_API WebAccessibilityObject firstChild() const;
+ WEBKIT_API WebAccessibilityObject focusedChild() const;
+ WEBKIT_API WebAccessibilityObject lastChild() const;
+ WEBKIT_API WebAccessibilityObject nextSibling() const;
+ WEBKIT_API WebAccessibilityObject parentObject() const;
+ WEBKIT_API WebAccessibilityObject previousSibling() const;
+
+ WEBKIT_API bool canSetSelectedAttribute() const;
+ WEBKIT_API bool isAnchor() const;
+ WEBKIT_API bool isChecked() const;
+ WEBKIT_API bool isCollapsed() const;
+ WEBKIT_API bool isFocused() const;
+ WEBKIT_API bool isEnabled() const;
+ WEBKIT_API bool isHovered() const;
+ WEBKIT_API bool isIndeterminate() const;
+ WEBKIT_API bool isLinked() const;
+ WEBKIT_API bool isMultiSelectable() const;
+ WEBKIT_API bool isOffScreen() const;
+ WEBKIT_API bool isPasswordField() const;
+ WEBKIT_API bool isPressed() const;
+ WEBKIT_API bool isReadOnly() const;
+ WEBKIT_API bool isSelected() const;
+ WEBKIT_API bool isVisible() const;
+ WEBKIT_API bool isVisited() const;
+
+ WEBKIT_API WebRect boundingBoxRect() const;
+ WEBKIT_API WebString helpText() const;
+ WEBKIT_API int headingLevel() const;
+ WEBKIT_API WebAccessibilityObject hitTest(const WebPoint&) const;
+ WEBKIT_API WebString keyboardShortcut() const;
+ WEBKIT_API bool performDefaultAction() const;
+ WEBKIT_API WebAccessibilityRole roleValue() const;
+ WEBKIT_API void setFocused(bool) const;
+ WEBKIT_API WebString stringValue() const;
+ WEBKIT_API WebString title() const;
+ WEBKIT_API WebURL url() const;
+
+ WEBKIT_API WebNode node() const;
+ WEBKIT_API WebDocument document() const;
+ WEBKIT_API bool hasComputedStyle() const;
+ WEBKIT_API WebString computedStyleDisplay() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebAccessibilityObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>&);
+ WebAccessibilityObject& operator=(const WTF::PassRefPtr<WebCore::AccessibilityObject>&);
+ operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const;
+#endif
+
+private:
+ void assign(WebAccessibilityObjectPrivate*);
+ WebAccessibilityObjectPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebAccessibilityRole.h b/Source/WebKit/chromium/public/WebAccessibilityRole.h
new file mode 100644
index 0000000..b0748a7
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAccessibilityRole.h
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2009 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 WebAccessibilityRole_h
+#define WebAccessibilityRole_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// These values must match WebCore::AccessibilityRole values
+enum WebAccessibilityRole {
+ WebAccessibilityRoleUnknown = 1,
+ WebAccessibilityRoleButton,
+ WebAccessibilityRoleRadioButton,
+ WebAccessibilityRoleCheckBox,
+ WebAccessibilityRoleSlider,
+ WebAccessibilityRoleTabGroup,
+ WebAccessibilityRoleTextField,
+ WebAccessibilityRoleStaticText,
+ WebAccessibilityRoleTextArea,
+ WebAccessibilityRoleScrollArea,
+ WebAccessibilityRolePopUpButton,
+ WebAccessibilityRoleMenuButton,
+ WebAccessibilityRoleTable,
+ WebAccessibilityRoleApplication,
+ WebAccessibilityRoleGroup,
+ WebAccessibilityRoleRadioGroup,
+ WebAccessibilityRoleList,
+ WebAccessibilityRoleScrollBar,
+ WebAccessibilityRoleValueIndicator,
+ WebAccessibilityRoleImage,
+ WebAccessibilityRoleMenuBar,
+ WebAccessibilityRoleMenu,
+ WebAccessibilityRoleMenuItem,
+ WebAccessibilityRoleColumn,
+ WebAccessibilityRoleRow,
+ WebAccessibilityRoleToolbar,
+ WebAccessibilityRoleBusyIndicator,
+ WebAccessibilityRoleProgressIndicator,
+ WebAccessibilityRoleWindow,
+ WebAccessibilityRoleDrawer,
+ WebAccessibilityRoleSystemWide,
+ WebAccessibilityRoleOutline,
+ WebAccessibilityRoleIncrementor,
+ WebAccessibilityRoleBrowser,
+ WebAccessibilityRoleComboBox,
+ WebAccessibilityRoleSplitGroup,
+ WebAccessibilityRoleSplitter,
+ WebAccessibilityRoleColorWell,
+ WebAccessibilityRoleGrowArea,
+ WebAccessibilityRoleSheet,
+ WebAccessibilityRoleHelpTag,
+ WebAccessibilityRoleMatte,
+ WebAccessibilityRoleRuler,
+ WebAccessibilityRoleRulerMarker,
+ WebAccessibilityRoleLink,
+ WebAccessibilityRoleDisclosureTriangle,
+ WebAccessibilityRoleGrid,
+ WebAccessibilityRoleCell,
+ WebAccessibilityRoleColumnHeader,
+ WebAccessibilityRoleRowHeader,
+
+ WebAccessibilityRoleWebCoreLink,
+ WebAccessibilityRoleImageMapLink,
+ WebAccessibilityRoleImageMap,
+ WebAccessibilityRoleListMarker,
+ WebAccessibilityRoleWebArea,
+ WebAccessibilityRoleHeading,
+ WebAccessibilityRoleListBox,
+ WebAccessibilityRoleListBoxOption,
+ WebAccessibilityRoleTableHeaderContainer,
+ WebAccessibilityRoleDefinitionListTerm,
+ WebAccessibilityRoleDefinitionListDefinition,
+ WebAccessibilityRoleAnnotation,
+ WebAccessibilityRoleSliderThumb,
+ WebAccessibilityRoleIgnored,
+ WebAccessibilityRolePresentational,
+ WebAccessibilityRoleTab,
+ WebAccessibilityRoleTabList,
+ WebAccessibilityRoleTabPanel,
+ WebAccessibilityRoleTreeRole,
+ WebAccessibilityRoleTreeGrid,
+ WebAccessibilityRoleTreeItemRole,
+ WebAccessibilityRoleDirectory,
+ WebAccessibilityRoleEditableText,
+
+ WebAccessibilityRoleListItem,
+ WebAccessibilityRoleMenuListPopup,
+ WebAccessibilityRoleMenuListOption,
+
+ WebAccessibilityRoleLandmarkApplication,
+ WebAccessibilityRoleLandmarkBanner,
+ WebAccessibilityRoleLandmarkComplementary,
+ WebAccessibilityRoleLandmarkContentInfo,
+ WebAccessibilityRoleLandmarkMain,
+ WebAccessibilityRoleLandmarkNavigation,
+ WebAccessibilityRoleLandmarkSearch,
+
+ WebAccessibilityRoleApplicationAlert,
+ WebAccessibilityRoleApplicationAlertDialog,
+ WebAccessibilityRoleApplicationDialog,
+ WebAccessibilityRoleApplicationLog,
+ WebAccessibilityRoleApplicationMarquee,
+ WebAccessibilityRoleApplicationStatus,
+ WebAccessibilityRoleApplicationTimer,
+
+ WebAccessibilityRoleDocument,
+ WebAccessibilityRoleDocumentArticle,
+ WebAccessibilityRoleDocumentMath,
+ WebAccessibilityRoleDocumentNote,
+ WebAccessibilityRoleDocumentRegion,
+
+ WebAccessibilityRoleUserInterfaceTooltip
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebAnimationController.h b/Source/WebKit/chromium/public/WebAnimationController.h
new file mode 100644
index 0000000..c61e531
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAnimationController.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2009 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 WebAnimationController_h
+#define WebAnimationController_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebElement;
+class WebString;
+class WebURL;
+
+// WebAnimationController can be used to control animations in a frame. It is
+// owned by a WebFrame and its life span is bound to that WebFrame.
+class WebAnimationController {
+public:
+ virtual bool pauseAnimationAtTime(WebElement&,
+ const WebString& animationName,
+ double time) = 0;
+ virtual bool pauseTransitionAtTime(WebElement&,
+ const WebString& propertyName,
+ double time) = 0;
+
+ virtual unsigned numberOfActiveAnimations() const = 0;
+ virtual void suspendAnimations() const = 0;
+ virtual void resumeAnimations() const = 0;
+
+protected:
+ ~WebAnimationController() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebApplicationCacheHost.h b/Source/WebKit/chromium/public/WebApplicationCacheHost.h
new file mode 100644
index 0000000..acbc106
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebApplicationCacheHost.h
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2010 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 WebApplicationCacheHost_h
+#define WebApplicationCacheHost_h
+
+#include "WebCommon.h"
+#include "WebURL.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebApplicationCacheHostClient;
+class WebURL;
+class WebURLRequest;
+class WebURLResponse;
+struct WebURLError;
+
+// This interface is used by webkit to call out to the embedder. Webkit uses
+// the WebFrameClient::createApplicationCacheHost method to create instances,
+// and calls delete when the instance is no longer needed.
+class WebApplicationCacheHost {
+public:
+ // These values must match WebCore::ApplicationCacheHost::Status values
+ enum Status {
+ Uncached,
+ Idle,
+ Checking,
+ Downloading,
+ UpdateReady,
+ Obsolete
+ };
+
+ // These values must match WebCore::ApplicationCacheHost::EventID values
+ enum EventID {
+ CheckingEvent,
+ ErrorEvent,
+ NoUpdateEvent,
+ DownloadingEvent,
+ ProgressEvent,
+ UpdateReadyEvent,
+ CachedEvent,
+ ObsoleteEvent
+ };
+
+ virtual ~WebApplicationCacheHost() { }
+
+ // Called for every request made within the context.
+ virtual void willStartMainResourceRequest(WebURLRequest&) { }
+ virtual void willStartSubResourceRequest(WebURLRequest&) { }
+
+ // One or the other selectCache methods is called after having parsed the <html> tag.
+ // The latter returns false if the current document has been identified as a "foreign"
+ // entry, in which case the frame navigation will be restarted by webkit.
+ virtual void selectCacheWithoutManifest() { }
+ virtual bool selectCacheWithManifest(const WebURL& manifestURL) { return true; }
+
+ // Called as the main resource is retrieved.
+ virtual void didReceiveResponseForMainResource(const WebURLResponse&) { }
+ virtual void didReceiveDataForMainResource(const char* data, int len) { }
+ virtual void didFinishLoadingMainResource(bool success) { }
+
+ // Called on behalf of the scriptable interface.
+ virtual Status status() { return Uncached; }
+ virtual bool startUpdate() { return false; }
+ virtual bool swapCache() { return false; }
+
+ // Structures and methods to support inspecting Application Caches.
+ struct CacheInfo {
+ WebURL manifestURL; // Empty if there is no associated cache.
+ double creationTime;
+ double updateTime;
+ long long totalSize;
+ CacheInfo() : creationTime(0), updateTime(0), totalSize(0) { }
+ };
+ struct ResourceInfo {
+ WebURL url;
+ long long size;
+ bool isMaster;
+ bool isManifest;
+ bool isExplicit;
+ bool isForeign;
+ bool isFallback;
+ ResourceInfo() : size(0), isMaster(false), isManifest(false), isExplicit(false), isForeign(false), isFallback(false) { }
+ };
+ virtual void getAssociatedCacheInfo(CacheInfo*) { }
+ virtual void getResourceList(WebVector<ResourceInfo>*) { }
+ virtual void deleteAssociatedCacheGroup() { }
+};
+
+} // namespace WebKit
+
+#endif // WebApplicationCacheHost_h
+
diff --git a/Source/WebKit/chromium/public/WebApplicationCacheHostClient.h b/Source/WebKit/chromium/public/WebApplicationCacheHostClient.h
new file mode 100644
index 0000000..3f84c51
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebApplicationCacheHostClient.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2009 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 WebApplicationCacheHostClient_h
+#define WebApplicationCacheHostClient_h
+
+#include "WebApplicationCacheHost.h"
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// This interface is used by the embedder to call into webkit.
+class WebApplicationCacheHostClient {
+public:
+ // Called when a different cache, including possibly no cache, is associated with the host.
+ virtual void didChangeCacheAssociation() = 0;
+
+ // Called to fire events in the scriptable interface.
+ virtual void notifyEventListener(WebApplicationCacheHost::EventID) = 0;
+ virtual void notifyProgressEventListener(const WebURL&, int num_total, int num_complete) = 0;
+
+protected:
+ // Should not be deleted by the embedder.
+ virtual ~WebApplicationCacheHostClient() { }
+};
+
+} // namespace WebKit
+
+#endif // WebApplicationCacheHostClient_h
+
diff --git a/Source/WebKit/chromium/public/WebAttribute.h b/Source/WebKit/chromium/public/WebAttribute.h
new file mode 100644
index 0000000..56e140b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAttribute.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 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 WebAttribute_h
+#define WebAttribute_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class Attribute; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebString;
+
+// Provides readonly access to some properties of a DOM attribute.
+class WebAttribute {
+public:
+ ~WebAttribute() { reset(); }
+
+ WebAttribute() { }
+ WebAttribute(const WebAttribute& n) { assign(n); }
+ WebAttribute& operator=(const WebAttribute& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebAttribute&);
+
+ WEBKIT_API WebString localName() const;
+ WEBKIT_API WebString value() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebAttribute(const WTF::PassRefPtr<WebCore::Attribute>&);
+#endif
+
+private:
+ WebPrivatePtr<WebCore::Attribute> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebAudioBus.h b/Source/WebKit/chromium/public/WebAudioBus.h
new file mode 100644
index 0000000..b7f8d74
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAudioBus.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010, 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 INC. 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 INC. 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 WebAudioBus_h
+#define WebAudioBus_h
+
+#include "WebCommon.h"
+
+namespace WebCore { class AudioBus; }
+
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassOwnPtr; }
+#endif
+
+namespace WebKit {
+
+class WebAudioBusPrivate;
+
+// A container for multi-channel linear PCM audio data.
+//
+// WARNING: It is not safe to pass a WebAudioBus across threads!!!
+//
+class WebAudioBus {
+public:
+ WebAudioBus() : m_private(0) { }
+ ~WebAudioBus() { reset(); }
+
+ // initialize() allocates memory of the given length for the given number of channels.
+ WEBKIT_API void initialize(unsigned numberOfChannels, size_t length, double sampleRate);
+
+ // reset() releases the memory allocated from initialize().
+ WEBKIT_API void reset();
+
+ WEBKIT_API unsigned numberOfChannels() const;
+ WEBKIT_API size_t length() const;
+ WEBKIT_API double sampleRate() const;
+
+ WEBKIT_API float* channelData(unsigned channelIndex);
+
+#if WEBKIT_IMPLEMENTATION
+ WTF::PassOwnPtr<WebCore::AudioBus> release();
+#endif
+
+private:
+ // Disallow copy and assign.
+ WebAudioBus(const WebAudioBus&);
+ void operator=(const WebAudioBus&);
+
+ WebCore::AudioBus* m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebAudioBus_h
diff --git a/Source/WebKit/chromium/public/WebAudioDevice.h b/Source/WebKit/chromium/public/WebAudioDevice.h
new file mode 100644
index 0000000..a9f5a1c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAudioDevice.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2010 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 WebAudioDevice_h
+#define WebAudioDevice_h
+
+#include "WebVector.h"
+
+namespace WebKit {
+
+// Abstract interface to the Chromium audio system.
+
+class WebAudioDevice {
+public:
+ class RenderCallback {
+ public:
+ virtual void render(const WebVector<float*>& audioData, size_t numberOfFrames) = 0;
+ protected:
+ virtual ~RenderCallback() { }
+ };
+
+ virtual ~WebAudioDevice() { }
+
+ virtual void start() = 0;
+ virtual void stop() = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebAudioDevice_h
diff --git a/Source/WebKit/chromium/public/WebAutoFillClient.h b/Source/WebKit/chromium/public/WebAutoFillClient.h
new file mode 100644
index 0000000..4e73be0
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebAutoFillClient.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2010 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 WebAutoFillClient_h
+#define WebAutoFillClient_h
+
+namespace WebKit {
+
+class WebInputElement;
+class WebKeyboardEvent;
+class WebNode;
+class WebString;
+
+class WebAutoFillClient {
+public:
+ // Informs the browser that the user has accepted an AutoFill suggestion for
+ // a WebNode. |uniqueID| is used as a key into the set of AutoFill profiles,
+ // and should never be negative. If it is 0, then the suggestion is an
+ // Autocomplete suggestion; and |value| stores the suggested text. |index|
+ // is an index of the selected suggestion in the list of suggestions provided
+ // by the client.
+ virtual void didAcceptAutoFillSuggestion(const WebNode&,
+ const WebString& value,
+ const WebString& label,
+ int uniqueID,
+ unsigned index) { }
+
+ // Informs the browser that the user has selected an AutoFill suggestion for
+ // a WebNode. This happens when the user hovers over a suggestion or uses
+ // the arrow keys to navigate to a suggestion.
+ virtual void didSelectAutoFillSuggestion(const WebNode&,
+ const WebString& name,
+ const WebString& label,
+ int uniqueID) { }
+
+ // Informs the browser that the user has cleared the selection from the
+ // AutoFill suggestions popup. This happens when a user uses the arrow
+ // keys to navigate outside the range of possible selections.
+ virtual void didClearAutoFillSelection(const WebNode&) { }
+
+ // Instructs the browser to remove the Autocomplete entry specified from
+ // its DB.
+ virtual void removeAutocompleteSuggestion(const WebString& name,
+ const WebString& value) { }
+
+ // Informs the browser that the user has selected an autocomplete (password
+ // or field) suggestion from the drop-down. The input element text has
+ // already been set to the selected suggestion.
+ virtual void didAcceptAutocompleteSuggestion(const WebInputElement&) { }
+
+ // These methods are called when the users edits a text-field.
+ virtual void textFieldDidBeginEditing(const WebInputElement&) { }
+ virtual void textFieldDidEndEditing(const WebInputElement&) { }
+ virtual void textFieldDidChange(const WebInputElement&) { }
+ virtual void textFieldDidReceiveKeyDown(const WebInputElement&, const WebKeyboardEvent&) { }
+
+protected:
+ ~WebAutoFillClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebBindings.h b/Source/WebKit/chromium/public/WebBindings.h
new file mode 100644
index 0000000..cb33781
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebBindings.h
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2009 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 WebBindings_h
+#define WebBindings_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebVector.h"
+#include <bindings/npruntime.h>
+
+namespace WebKit {
+
+class WebDragData;
+class WebElement;
+class WebRange;
+
+// A haphazard collection of functions for dealing with plugins.
+class WebBindings {
+public:
+ // NPN Functions ------------------------------------------------------
+ // These are all defined in npruntime.h and are well documented.
+
+ // NPN_Construct
+ WEBKIT_API static bool construct(NPP, NPObject*, const NPVariant* args, uint32_t argCount, NPVariant* result);
+
+ // NPN_CreateObject
+ WEBKIT_API static NPObject* createObject(NPP, NPClass*);
+
+ // NPN_Enumerate
+ WEBKIT_API static bool enumerate(NPP, NPObject*, NPIdentifier**, uint32_t* count);
+
+ // NPN_Evaluate
+ WEBKIT_API static bool evaluate(NPP, NPObject*, NPString* script, NPVariant* result);
+
+ // NPN_EvaluateHelper
+ WEBKIT_API static bool evaluateHelper(NPP, bool popupsAllowed, NPObject*, NPString* script, NPVariant* result);
+
+ // NPN_GetIntIdentifier
+ WEBKIT_API static NPIdentifier getIntIdentifier(int32_t number);
+
+ // NPN_GetProperty
+ WEBKIT_API static bool getProperty(NPP, NPObject*, NPIdentifier propertyName, NPVariant *result);
+
+ // NPN_GetStringIdentifier
+ WEBKIT_API static NPIdentifier getStringIdentifier(const NPUTF8* string);
+
+ // NPN_GetStringIdentifiers
+ WEBKIT_API static void getStringIdentifiers(const NPUTF8** names, int32_t nameCount, NPIdentifier*);
+
+ // NPN_HasMethod
+ WEBKIT_API static bool hasMethod(NPP, NPObject*, NPIdentifier methodName);
+
+ // NPN_HasProperty
+ WEBKIT_API static bool hasProperty(NPP, NPObject*, NPIdentifier propertyName);
+
+ // NPN_IdentifierIsString
+ WEBKIT_API static bool identifierIsString(NPIdentifier);
+
+ // NPN_InitializeVariantWithStringCopy (though sometimes prefixed with an underscore)
+ WEBKIT_API static void initializeVariantWithStringCopy(NPVariant*, const NPString*);
+
+ // NPN_IntFromIdentifier
+ WEBKIT_API static int32_t intFromIdentifier(NPIdentifier);
+
+ // NPN_Invoke
+ WEBKIT_API static bool invoke(NPP, NPObject*, NPIdentifier methodName, const NPVariant* args, uint32_t count, NPVariant* result);
+
+ // NPN_InvokeDefault
+ WEBKIT_API static bool invokeDefault(NPP, NPObject*, const NPVariant* args, uint32_t count, NPVariant* result);
+
+ // NPN_ReleaseObject
+ WEBKIT_API static void releaseObject(NPObject*);
+
+ // NPN_ReleaseVariantValue
+ WEBKIT_API static void releaseVariantValue(NPVariant*);
+
+ // NPN_RemoveProperty
+ WEBKIT_API static bool removeProperty(NPP, NPObject*, NPIdentifier);
+
+ // NPN_RetainObject
+ WEBKIT_API static NPObject* retainObject(NPObject*);
+
+ // NPN_SetException
+ WEBKIT_API static void setException(NPObject*, const NPUTF8* message);
+
+ // NPN_SetProperty
+ WEBKIT_API static bool setProperty(NPP, NPObject*, NPIdentifier, const NPVariant*);
+
+ // _NPN_UnregisterObject
+ WEBKIT_API static void unregisterObject(NPObject*);
+
+ // NPN_UTF8FromIdentifier
+ WEBKIT_API static NPUTF8* utf8FromIdentifier(NPIdentifier);
+
+ // Miscellaneous utility functions ----------------------------------------
+
+ // Complement to NPN_Get___Identifier functions. Extracts data from the NPIdentifier data
+ // structure. If isString is true upon return, string will be set but number's value is
+ // undefined. If iString is false, the opposite is true.
+ WEBKIT_API static void extractIdentifierData(const NPIdentifier&, const NPUTF8*& string, int32_t& number, bool& isString);
+
+ // Return true (success) if the given npobj is the current drag event in browser dispatch,
+ // and is accessible based on context execution frames and their security origins and
+ // WebKit clipboard access policy. If so, return the event id and the clipboard data (WebDragData).
+ // This only works with V8. If compiled without V8, it'll always return false.
+ WEBKIT_API static bool getDragData(NPObject* event, int* eventId, WebDragData*);
+
+ // Invoke the event access policy checks listed above with GetDragData(). No need for clipboard
+ // data or event_id outputs, just confirm the given npobj is the current & accessible drag event.
+ // This only works with V8. If compiled without V8, it'll always return false.
+ WEBKIT_API static bool isDragEvent(NPObject* event);
+
+ // Return true (success) if the given npobj is a range object.
+ // If so, return that range as a WebRange object.
+ WEBKIT_API static bool getRange(NPObject* range, WebRange*);
+
+ // Return true (success) if the given npobj is an element.
+ // If so, return that element as a WebElement object.
+ WEBKIT_API static bool getElement(NPObject* element, WebElement*);
+
+ WEBKIT_API static NPObject* makeIntArray(const WebVector<int>&);
+ WEBKIT_API static NPObject* makeStringArray(const WebVector<WebString>&);
+
+ // Exceptions -------------------------------------------------------------
+
+ typedef void (ExceptionHandler)(void* data, const NPUTF8* message);
+
+ // The exception handler will be notified of any exceptions thrown while
+ // operating on a NPObject.
+ WEBKIT_API static void pushExceptionHandler(ExceptionHandler, void* data);
+ WEBKIT_API static void popExceptionHandler();
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebBlobData.h b/Source/WebKit/chromium/public/WebBlobData.h
new file mode 100644
index 0000000..67b6cd6
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebBlobData.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2010 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 WebBlobData_h
+#define WebBlobData_h
+
+#include "WebThreadSafeData.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class BlobData; }
+namespace WTF { template <typename T> class PassOwnPtr; }
+#endif
+
+namespace WebKit {
+
+class WebBlobDataPrivate;
+
+class WebBlobData {
+public:
+ struct Item {
+ enum { TypeData, TypeFile, TypeBlob } type;
+ WebThreadSafeData data;
+ WebString filePath;
+ WebURL blobURL;
+ long long offset;
+ long long length; // -1 means go to the end of the file/blob.
+ double expectedModificationTime; // 0.0 means that the time is not set.
+ };
+
+ ~WebBlobData() { reset(); }
+
+ WebBlobData() : m_private(0) { }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+
+ bool isNull() const { return !m_private; }
+
+ // Returns the number of items.
+ WEBKIT_API size_t itemCount() const;
+
+ // Retrieves the values of the item at the given index. Returns false if
+ // index is out of bounds.
+ WEBKIT_API bool itemAt(size_t index, Item& result) const;
+
+ WEBKIT_API WebString contentType() const;
+
+ WEBKIT_API WebString contentDisposition() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebBlobData(const WTF::PassOwnPtr<WebCore::BlobData>&);
+ WebBlobData& operator=(const WTF::PassOwnPtr<WebCore::BlobData>&);
+ operator WTF::PassOwnPtr<WebCore::BlobData>();
+#endif
+
+private:
+#if WEBKIT_IMPLEMENTATION
+ void assign(const WTF::PassOwnPtr<WebCore::BlobData>&);
+#endif
+ WebBlobDataPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebBlobData_h
diff --git a/Source/WebKit/chromium/public/WebBlobRegistry.h b/Source/WebKit/chromium/public/WebBlobRegistry.h
new file mode 100644
index 0000000..7c5be55
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebBlobRegistry.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 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 WebBlobRegistry_h
+#define WebBlobRegistry_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebBlobData;
+class WebURL;
+
+class WebBlobRegistry {
+public:
+ WEBKIT_API static WebBlobRegistry* create();
+
+ virtual ~WebBlobRegistry() { }
+
+ // Registers a blob URL referring to the specified blob data.
+ virtual void registerBlobURL(const WebURL&, WebBlobData&) = 0;
+
+ // Registers a blob URL referring to the blob data identified by the specified srcURL.
+ virtual void registerBlobURL(const WebURL&, const WebURL& srcURL) = 0;
+
+ virtual void unregisterBlobURL(const WebURL&) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebBlobRegistry_h
diff --git a/Source/WebKit/chromium/public/WebCString.h b/Source/WebKit/chromium/public/WebCString.h
new file mode 100644
index 0000000..0320eb6
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCString.h
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2009 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 WebCString_h
+#define WebCString_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/Forward.h>
+#else
+#include <string>
+#endif
+
+namespace WTF {
+class CString;
+}
+
+namespace WebKit {
+
+class WebCStringPrivate;
+class WebString;
+
+// A single-byte string container with unspecified encoding. It is
+// inexpensive to copy a WebCString object.
+//
+// WARNING: It is not safe to pass a WebCString across threads!!!
+//
+class WebCString {
+public:
+ ~WebCString() { reset(); }
+
+ WebCString() : m_private(0) { }
+
+ WebCString(const char* data, size_t len) : m_private(0)
+ {
+ assign(data, len);
+ }
+
+ WebCString(const WebCString& s) : m_private(0) { assign(s); }
+
+ WebCString& operator=(const WebCString& s)
+ {
+ assign(s);
+ return *this;
+ }
+
+ // Returns 0 if both strings are equals, a value greater than zero if the
+ // first character that does not match has a greater value in this string
+ // than in |other|, or a value less than zero to indicate the opposite.
+ WEBKIT_API int compare(const WebCString& other) const;
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebCString&);
+ WEBKIT_API void assign(const char* data, size_t len);
+
+ WEBKIT_API size_t length() const;
+ WEBKIT_API const char* data() const;
+
+ bool isEmpty() const { return !length(); }
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebString utf16() const;
+
+ WEBKIT_API static WebCString fromUTF16(const WebUChar* data, size_t length);
+ WEBKIT_API static WebCString fromUTF16(const WebUChar* data);
+
+#if WEBKIT_IMPLEMENTATION
+ WebCString(const WTF::CString&);
+ WebCString& operator=(const WTF::CString&);
+ operator WTF::CString() const;
+#else
+ WebCString(const std::string& s) : m_private(0)
+ {
+ assign(s.data(), s.length());
+ }
+
+ WebCString& operator=(const std::string& s)
+ {
+ assign(s.data(), s.length());
+ return *this;
+ }
+
+ operator std::string() const
+ {
+ size_t len = length();
+ return len ? std::string(data(), len) : std::string();
+ }
+
+ template <class UTF16String>
+ static WebCString fromUTF16(const UTF16String& s)
+ {
+ return fromUTF16(s.data(), s.length());
+ }
+#endif
+
+private:
+ void assign(WebCStringPrivate*);
+ WebCStringPrivate* m_private;
+};
+
+inline bool operator<(const WebCString& a, const WebCString& b)
+{
+ return a.compare(b) < 0;
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCache.h b/Source/WebKit/chromium/public/WebCache.h
new file mode 100644
index 0000000..e8a18d3
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCache.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2009 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 WebCache_h
+#define WebCache_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// An interface to query and configure WebKit's resource cache.
+class WebCache {
+public:
+ struct UsageStats {
+ // Capacities.
+ size_t minDeadCapacity;
+ size_t maxDeadCapacity;
+ size_t capacity;
+ // Utilization.
+ size_t liveSize;
+ size_t deadSize;
+ };
+
+ // A struct mirroring WebCore::MemoryCache::TypeStatistic.
+ struct ResourceTypeStat {
+ size_t count;
+ size_t size;
+ size_t liveSize;
+ size_t decodedSize;
+ };
+
+ // A struct mirroring WebCore::MemoryCache::Statistics.
+ struct ResourceTypeStats {
+ ResourceTypeStat images;
+ ResourceTypeStat cssStyleSheets;
+ ResourceTypeStat scripts;
+ ResourceTypeStat xslStyleSheets;
+ ResourceTypeStat fonts;
+ };
+
+ // Sets the capacities of the resource cache, evicting objects as necessary.
+ WEBKIT_API static void setCapacities(size_t minDeadCapacity,
+ size_t maxDeadCapacity,
+ size_t capacity);
+
+ // Clears the cache (as much as possible; some resources may not be
+ // cleared if they are actively referenced).
+ WEBKIT_API static void clear();
+
+ // Gets the usage statistics from the resource cache.
+ WEBKIT_API static void getUsageStats(UsageStats*);
+
+ // Get usage stats about the resource cache.
+ WEBKIT_API static void getResourceTypeStats(ResourceTypeStats*);
+
+private:
+ WebCache(); // Not intended to be instanced.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCanvas.h b/Source/WebKit/chromium/public/WebCanvas.h
new file mode 100644
index 0000000..4675487
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCanvas.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2009 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 WebCanvas_h
+#define WebCanvas_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_USING_SKIA
+namespace skia { class PlatformCanvas; }
+#elif WEBKIT_USING_CG
+struct CGContext;
+#endif
+
+namespace WebKit {
+
+#if WEBKIT_USING_SKIA
+typedef skia::PlatformCanvas WebCanvas;
+#elif WEBKIT_USING_CG
+typedef struct CGContext WebCanvas;
+#else
+#error "Need to define WebCanvas"
+#endif
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebClipboard.h b/Source/WebKit/chromium/public/WebClipboard.h
new file mode 100644
index 0000000..861c522
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebClipboard.h
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2009 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 WebClipboard_h
+#define WebClipboard_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebDragData;
+class WebImage;
+class WebURL;
+
+class WebClipboard {
+public:
+ enum Format {
+ FormatHTML,
+ FormatBookmark,
+ FormatSmartPaste
+ };
+
+ enum Buffer {
+ BufferStandard,
+ // Used on platforms like the X Window System that treat selection
+ // as a type of clipboard.
+ BufferSelection,
+ // Read-only buffer corresponding to the current drag operation, if any.
+ BufferDrag,
+ };
+
+ virtual bool isFormatAvailable(Format, Buffer) { return false; }
+
+ virtual WebString readPlainText(Buffer) { return WebString(); }
+ virtual WebString readHTML(Buffer, WebURL*) { return WebString(); }
+
+ virtual void writePlainText(const WebString&) { }
+ virtual void writeHTML(
+ const WebString& htmlText, const WebURL&,
+ const WebString& plainText, bool writeSmartPaste) { }
+ virtual void writeURL(
+ const WebURL&, const WebString& title) { }
+ virtual void writeImage(
+ const WebImage&, const WebURL&, const WebString& title) { }
+ virtual void writeData(
+ const WebString& type,
+ const WebString& data,
+ const WebString& metadata) { }
+
+ // The following functions are used for reading platform data for copy and
+ // paste, drag and drop, and selection copy (on X).
+ virtual WebVector<WebString> readAvailableTypes(
+ Buffer, bool* containsFilenames) { return WebVector<WebString>(); }
+ // Returns true if the requested type was successfully read from the buffer.
+ virtual bool readData(
+ Buffer, const WebString& type, WebString* data,
+ WebString* metadata) { return false; }
+ virtual WebVector<WebString> readFilenames(
+ Buffer) { return WebVector<WebString>(); }
+
+protected:
+ ~WebClipboard() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebColor.h b/Source/WebKit/chromium/public/WebColor.h
new file mode 100644
index 0000000..034f8db
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebColor.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2009 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 WebColor_h
+#define WebColor_h
+
+#include "WebColorName.h"
+#include "WebCommon.h"
+
+namespace WebKit {
+
+typedef unsigned WebColor; // RGBA quad. Equivalent to SkColor.
+
+// Sets the values of a set of named colors.
+WEBKIT_API void setNamedColors(const WebColorName*, const WebColor*, size_t length);
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebColorName.h b/Source/WebKit/chromium/public/WebColorName.h
new file mode 100644
index 0000000..f97ed26
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebColorName.h
@@ -0,0 +1,71 @@
+/*
+* Copyright (C) 2009 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 WebColorName_h
+#define WebColorName_h
+
+namespace WebKit {
+
+enum WebColorName {
+ WebColorActiveBorder,
+ WebColorActiveCaption,
+ WebColorAppworkspace,
+ WebColorBackground,
+ WebColorButtonFace,
+ WebColorButtonHighlight,
+ WebColorButtonShadow,
+ WebColorButtonText,
+ WebColorCaptionText,
+ WebColorGrayText,
+ WebColorHighlight,
+ WebColorHighlightText,
+ WebColorInactiveBorder,
+ WebColorInactiveCaption,
+ WebColorInactiveCaptionText,
+ WebColorInfoBackground,
+ WebColorInfoText,
+ WebColorMenu,
+ WebColorMenuText,
+ WebColorScrollbar,
+ WebColorText,
+ WebColorThreedDarkShadow,
+ WebColorThreedShadow,
+ WebColorThreedFace,
+ WebColorThreedHighlight,
+ WebColorThreedLightShadow,
+ WebColorWebkitFocusRingColor,
+ WebColorWindow,
+ WebColorWindowFrame,
+ WebColorWindowText
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCommon.h b/Source/WebKit/chromium/public/WebCommon.h
new file mode 100644
index 0000000..2bfa17d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCommon.h
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2010 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 WebCommon_h
+#define WebCommon_h
+
+// -----------------------------------------------------------------------------
+// Default configuration
+
+#if !defined(WEBKIT_IMPLEMENTATION)
+ #define WEBKIT_IMPLEMENTATION 0
+#endif
+
+#if !defined(WEBKIT_USING_SKIA)
+ #if !defined(__APPLE__)
+ #define WEBKIT_USING_SKIA 1
+ #else
+ #define WEBKIT_USING_SKIA 0
+ #endif
+#endif
+
+#if !defined(WEBKIT_USING_CG)
+ #if defined(__APPLE__)
+ #define WEBKIT_USING_CG 1
+ #else
+ #define WEBKIT_USING_CG 0
+ #endif
+#endif
+
+#if !defined(WEBKIT_USING_V8)
+ #define WEBKIT_USING_V8 1
+#endif
+
+#if !defined(WEBKIT_USING_JSC)
+ #define WEBKIT_USING_JSC 0
+#endif
+
+// -----------------------------------------------------------------------------
+// Exported symbols need to be annotated with WEBKIT_API
+
+#if defined(WIN32) && defined(WEBKIT_DLL)
+ #if WEBKIT_IMPLEMENTATION
+ #define WEBKIT_API __declspec(dllexport)
+ #else
+ #define WEBKIT_API __declspec(dllimport)
+ #endif
+#else
+ #define WEBKIT_API
+#endif
+
+// -----------------------------------------------------------------------------
+// Basic types
+
+#include <stddef.h> // For size_t
+
+#if defined(WIN32)
+// Visual Studio doesn't have stdint.h.
+typedef short int16_t;
+typedef unsigned short uint16_t;
+typedef int int32_t;
+typedef unsigned int uint32_t;
+#endif
+
+namespace WebKit {
+
+// UTF-16 character type
+#if defined(WIN32)
+typedef wchar_t WebUChar;
+#else
+typedef unsigned short WebUChar;
+#endif
+
+// -----------------------------------------------------------------------------
+// Assertions
+
+WEBKIT_API void failedAssertion(const char* file, int line, const char* function, const char* assertion);
+
+} // namespace WebKit
+
+// Ideally, only use inside the public directory but outside of WEBKIT_IMPLEMENTATION blocks. (Otherwise use WTF's ASSERT.)
+#if defined(NDEBUG)
+#define WEBKIT_ASSERT(assertion) ((void)0)
+#else
+#define WEBKIT_ASSERT(assertion) do { \
+ if (!(assertion)) \
+ failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \
+} while (0)
+#endif
+
+#define WEBKIT_ASSERT_NOT_REACHED() WEBKIT_ASSERT(0)
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCommonWorkerClient.h b/Source/WebKit/chromium/public/WebCommonWorkerClient.h
new file mode 100644
index 0000000..b99d39d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCommonWorkerClient.h
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2009 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 WebCommonWorkerClient_h
+#define WebCommonWorkerClient_h
+
+#include "WebCommon.h"
+#include "WebFileSystem.h"
+
+namespace WebKit {
+
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
+class WebFrame;
+class WebNotificationPresenter;
+class WebString;
+class WebWorker;
+class WebWorkerClient;
+
+// Provides an interface back to the in-page script object for a worker.
+// This interface contains common APIs used by both shared and dedicated
+// workers.
+// All functions are expected to be called back on the thread that created
+// the Worker object, unless noted.
+class WebCommonWorkerClient {
+public:
+ virtual void postExceptionToWorkerObject(
+ const WebString& errorString, int lineNumber,
+ const WebString& sourceURL) = 0;
+
+ // FIXME: the below is for compatibility only and should be
+ // removed once Chromium is updated to remove message
+ // destination parameter <http://webkit.org/b/37155>.
+ virtual void postConsoleMessageToWorkerObject(int, int sourceIdentifier, int messageType, int messageLevel,
+ const WebString& message, int lineNumber, const WebString& sourceURL) = 0;
+
+ virtual void postConsoleMessageToWorkerObject(int sourceIdentifier, int messageType, int messageLevel,
+ const WebString& message, int lineNumber, const WebString& sourceURL)
+ {
+ postConsoleMessageToWorkerObject(0, sourceIdentifier, messageType, messageLevel,
+ message, lineNumber, sourceURL);
+ }
+
+ virtual void workerContextClosed() = 0;
+ virtual void workerContextDestroyed() = 0;
+
+ // Returns the notification presenter for this worker context. Pointer
+ // is owned by the object implementing WebCommonWorkerClient.
+ virtual WebNotificationPresenter* notificationPresenter() = 0;
+
+ // This can be called on any thread to create a nested WebWorker.
+ // WebSharedWorkers are not instantiated via this API - instead
+ // they are created via the WebSharedWorkerRepository.
+ virtual WebWorker* createWorker(WebWorkerClient* client) = 0;
+
+ // Called on the main webkit thread in the worker process during initialization.
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) = 0;
+
+ // Called on the main webkit thread before opening a web database.
+ virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) = 0;
+
+ // Called on the main webkit thread before opening a file system.
+ virtual void openFileSystem(WebFileSystem::Type, long long size, bool create, WebFileSystemCallbacks*)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+
+ // This will be removed once changes in chromium use the new method above.
+ virtual void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+
+protected:
+ ~WebCommonWorkerClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCompositionUnderline.h b/Source/WebKit/chromium/public/WebCompositionUnderline.h
new file mode 100644
index 0000000..d8b0d63
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCompositionUnderline.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 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 WebCompositionUnderline_h
+#define WebCompositionUnderline_h
+
+#include "WebColor.h"
+
+namespace WebKit {
+
+// Class WebCompositionUnderline is intended to be used with WebWidget's
+// setComposition() method.
+struct WebCompositionUnderline {
+ WebCompositionUnderline()
+ : startOffset(0)
+ , endOffset(0)
+ , color(0)
+ , thick(false) { }
+
+ WebCompositionUnderline(unsigned s, unsigned e, WebColor c, bool t)
+ : startOffset(s)
+ , endOffset(e)
+ , color(c)
+ , thick(t) { }
+
+ unsigned startOffset;
+ unsigned endOffset;
+ WebColor color;
+ bool thick;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebConsoleMessage.h b/Source/WebKit/chromium/public/WebConsoleMessage.h
new file mode 100644
index 0000000..d7a0ead
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebConsoleMessage.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009 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 WebConsoleMessage_h
+#define WebConsoleMessage_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+struct WebConsoleMessage {
+ enum Level {
+ LevelTip,
+ LevelLog,
+ LevelWarning,
+ LevelError
+ };
+
+ Level level;
+ WebString text;
+
+ WebConsoleMessage()
+ : level(LevelLog) { }
+ WebConsoleMessage(Level level, const WebString& text)
+ : level(LevelLog)
+ , text(text) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebContextMenuData.h b/Source/WebKit/chromium/public/WebContextMenuData.h
new file mode 100644
index 0000000..606994b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebContextMenuData.h
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2009 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 WebContextMenuData_h
+#define WebContextMenuData_h
+
+#include "WebMenuItemInfo.h"
+#include "WebNode.h"
+#include "WebPoint.h"
+#include "WebString.h"
+#include "WebURL.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+// This struct is passed to WebViewClient::ShowContextMenu.
+struct WebContextMenuData {
+ enum MediaType {
+ // No special node is in context.
+ MediaTypeNone,
+ // An image node is selected.
+ MediaTypeImage,
+ // A video node is selected.
+ MediaTypeVideo,
+ // An audio node is selected.
+ MediaTypeAudio,
+ // A plugin node is selected.
+ MediaTypePlugin,
+ };
+ // The type of media the context menu is being invoked on.
+ MediaType mediaType;
+
+ // The x and y position of the mouse pointer (relative to the webview).
+ WebPoint mousePosition;
+
+ // The absolute URL of the link that is in context.
+ WebURL linkURL;
+
+ // The absolute URL of the image/video/audio that is in context.
+ WebURL srcURL;
+
+ // Whether the image in context has been blocked.
+ bool isImageBlocked;
+
+ // The absolute URL of the page in context.
+ WebURL pageURL;
+
+ // The absolute URL of the subframe in context.
+ WebURL frameURL;
+
+ // The encoding for the frame in context.
+ WebString frameEncoding;
+
+ enum MediaFlags {
+ MediaNone = 0x0,
+ MediaInError = 0x1,
+ MediaPaused = 0x2,
+ MediaMuted = 0x4,
+ MediaLoop = 0x8,
+ MediaCanSave = 0x10,
+ MediaHasAudio = 0x20,
+ MediaHasVideo = 0x40,
+ MediaControls = 0x80,
+ MediaCanPrint = 0x100,
+ };
+
+ // Extra attributes describing media elements.
+ int mediaFlags;
+
+ // The raw text of the selection in context.
+ WebString selectedText;
+
+ // Whether spell checking is enabled.
+ bool isSpellCheckingEnabled;
+
+ // The editable (possibily) misspelled word.
+ WebString misspelledWord;
+
+ // Whether context is editable.
+ bool isEditable;
+
+ enum CheckableMenuItemFlags {
+ CheckableMenuItemDisabled = 0x0,
+ CheckableMenuItemEnabled = 0x1,
+ CheckableMenuItemChecked = 0x2,
+ };
+
+ // Writing direction menu items - values are unions of
+ // CheckableMenuItemFlags.
+ // Currently only used on OS X.
+ int writingDirectionDefault;
+ int writingDirectionLeftToRight;
+ int writingDirectionRightToLeft;
+
+ enum EditFlags {
+ CanDoNone = 0x0,
+ CanUndo = 0x1,
+ CanRedo = 0x2,
+ CanCut = 0x4,
+ CanCopy = 0x8,
+ CanPaste = 0x10,
+ CanDelete = 0x20,
+ CanSelectAll = 0x40,
+ CanTranslate = 0x80,
+ };
+
+ // Which edit operations are available in the context.
+ int editFlags;
+
+ // Security information for the context.
+ WebCString securityInfo;
+
+ // Custom context menu items provided by the WebCore internals.
+ WebVector<WebMenuItemInfo> customItems;
+
+ // The node that was clicked.
+ WebNode node;
+
+ WebContextMenuData()
+ : mediaType(MediaTypeNone)
+ , isImageBlocked(false)
+ , mediaFlags(MediaNone)
+ , isSpellCheckingEnabled(false)
+ , isEditable(false)
+ , writingDirectionDefault(CheckableMenuItemDisabled)
+ , writingDirectionLeftToRight(CheckableMenuItemEnabled)
+ , writingDirectionRightToLeft(CheckableMenuItemEnabled)
+ , editFlags(0) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCookie.h b/Source/WebKit/chromium/public/WebCookie.h
new file mode 100644
index 0000000..81cb361
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCookie.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2009 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 WebCookie_h
+#define WebCookie_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebString;
+
+// A cookie.
+//
+struct WebCookie {
+ WebCookie()
+ : expires(0)
+ , httpOnly(false)
+ , secure(false)
+ , session(false)
+ {
+ }
+
+ WebCookie(const WebString& name, const WebString& value, const WebString& domain,
+ const WebString& path, double expires, bool httpOnly, bool secure, bool session)
+ : name(name)
+ , value(value)
+ , domain(domain)
+ , path(path)
+ , expires(expires)
+ , httpOnly(httpOnly)
+ , secure(secure)
+ , session(session)
+ {
+ }
+
+ WebString name;
+ WebString value;
+ WebString domain;
+ WebString path;
+ double expires;
+ bool httpOnly;
+ bool secure;
+ bool session;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCookieJar.h b/Source/WebKit/chromium/public/WebCookieJar.h
new file mode 100644
index 0000000..6daba6b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCookieJar.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 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 WebCookieJar_h
+#define WebCookieJar_h
+
+#include "WebString.h"
+
+namespace WebKit {
+class WebURL;
+struct WebCookie;
+template <typename T> class WebVector;
+
+class WebCookieJar {
+public:
+ virtual void setCookie(const WebURL&, const WebURL& firstPartyForCookies, const WebString& cookie) { }
+ virtual WebString cookies(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); }
+ virtual WebString cookieRequestHeaderFieldValue(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); }
+ virtual void rawCookies(const WebURL&, const WebURL& firstPartyForCookies, WebVector<WebCookie>&) { }
+ virtual void deleteCookie(const WebURL&, const WebString& cookieName) { }
+ virtual bool cookiesEnabled(const WebURL&, const WebURL& firstPartyForCookies) { return true; }
+
+protected:
+ ~WebCookieJar() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h b/Source/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h
new file mode 100644
index 0000000..62827f7
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2009 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 WebCrossOriginPreflightResultCache_h
+#define WebCrossOriginPreflightResultCache_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// An interface to configure WebKit's cross-origin preflight result cache.
+class WebCrossOriginPreflightResultCache {
+public:
+ // Clears the cache.
+ WEBKIT_API static void clear();
+
+private:
+ WebCrossOriginPreflightResultCache(); // Not intended to be instanced.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebCursorInfo.h b/Source/WebKit/chromium/public/WebCursorInfo.h
new file mode 100644
index 0000000..8926e5c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebCursorInfo.h
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2009 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 WebCursorInfo_h
+#define WebCursorInfo_h
+
+#include "WebImage.h"
+#include "WebPoint.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Cursor; }
+#endif
+
+#ifdef WIN32
+typedef struct HICON__* HICON;
+typedef HICON HCURSOR;
+#endif
+
+namespace WebKit {
+
+struct WebCursorInfo {
+ enum Type {
+ TypePointer,
+ TypeCross,
+ TypeHand,
+ TypeIBeam,
+ TypeWait,
+ TypeHelp,
+ TypeEastResize,
+ TypeNorthResize,
+ TypeNorthEastResize,
+ TypeNorthWestResize,
+ TypeSouthResize,
+ TypeSouthEastResize,
+ TypeSouthWestResize,
+ TypeWestResize,
+ TypeNorthSouthResize,
+ TypeEastWestResize,
+ TypeNorthEastSouthWestResize,
+ TypeNorthWestSouthEastResize,
+ TypeColumnResize,
+ TypeRowResize,
+ TypeMiddlePanning,
+ TypeEastPanning,
+ TypeNorthPanning,
+ TypeNorthEastPanning,
+ TypeNorthWestPanning,
+ TypeSouthPanning,
+ TypeSouthEastPanning,
+ TypeSouthWestPanning,
+ TypeWestPanning,
+ TypeMove,
+ TypeVerticalText,
+ TypeCell,
+ TypeContextMenu,
+ TypeAlias,
+ TypeProgress,
+ TypeNoDrop,
+ TypeCopy,
+ TypeNone,
+ TypeNotAllowed,
+ TypeZoomIn,
+ TypeZoomOut,
+ TypeCustom
+ };
+
+ Type type;
+ WebPoint hotSpot;
+ WebImage customImage;
+
+#ifdef WIN32
+ // On Windows, TypeCustom may alternatively reference an externally
+ // defined HCURSOR. If type is TypeCustom and externalHandle is non-
+ // null, then customData should be ignored. The WebCursorInfo is not
+ // responsible for managing the lifetime of this cursor handle.
+ HCURSOR externalHandle;
+#endif
+
+ explicit WebCursorInfo(Type type = TypePointer)
+ : type(type)
+ {
+#ifdef WIN32
+ externalHandle = 0;
+#endif
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ explicit WebCursorInfo(const WebCore::Cursor&);
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDOMEvent.h b/Source/WebKit/chromium/public/WebDOMEvent.h
new file mode 100644
index 0000000..fa02b0c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDOMEvent.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2010 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 WebDOMEvent_h
+#define WebDOMEvent_h
+
+#include "WebCommon.h"
+#include "WebNode.h"
+#include "WebString.h"
+
+namespace WebCore { class Event; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebDOMEvent {
+public:
+ enum PhaseType {
+ CapturingPhase = 1,
+ AtTarget = 2,
+ BubblingPhase = 3
+ };
+
+ ~WebDOMEvent() { reset(); }
+
+ WebDOMEvent() : m_private(0) { }
+ WebDOMEvent(const WebDOMEvent& e) : m_private(0) { assign(e); }
+ WebDOMEvent& operator=(const WebDOMEvent& e)
+ {
+ assign(e);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebDOMEvent&);
+
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebString type() const;
+ WEBKIT_API WebNode target() const;
+ WEBKIT_API WebNode currentTarget() const;
+
+ WEBKIT_API PhaseType eventPhase() const;
+ WEBKIT_API bool bubbles() const;
+ WEBKIT_API bool cancelable() const;
+
+ WEBKIT_API bool isUIEvent() const;
+ WEBKIT_API bool isMouseEvent() const;
+ WEBKIT_API bool isMutationEvent() const;
+ WEBKIT_API bool isKeyboardEvent() const;
+ WEBKIT_API bool isTextEvent() const;
+ WEBKIT_API bool isCompositionEvent() const;
+ WEBKIT_API bool isDragEvent() const;
+ WEBKIT_API bool isClipboardEvent() const;
+ WEBKIT_API bool isMessageEvent() const;
+ WEBKIT_API bool isWheelEvent() const;
+ WEBKIT_API bool isBeforeTextInsertedEvent() const;
+ WEBKIT_API bool isOverflowEvent() const;
+ WEBKIT_API bool isPageTransitionEvent() const;
+ WEBKIT_API bool isPopStateEvent() const;
+ WEBKIT_API bool isProgressEvent() const;
+ WEBKIT_API bool isXMLHttpRequestProgressEvent() const;
+ WEBKIT_API bool isWebKitAnimationEvent() const;
+ WEBKIT_API bool isWebKitTransitionEvent() const;
+ WEBKIT_API bool isBeforeLoadEvent() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebDOMEvent(const WTF::PassRefPtr<WebCore::Event>&);
+#endif
+
+ template<typename T> T to()
+ {
+ T res;
+ res.WebDOMEvent::assign(*this);
+ return res;
+ }
+
+ template<typename T> const T toConst() const
+ {
+ T res;
+ res.WebDOMEvent::assign(*this);
+ return res;
+ }
+
+protected:
+ typedef WebCore::Event WebDOMEventPrivate;
+ void assign(WebDOMEventPrivate*);
+ WebDOMEventPrivate* m_private;
+
+ template<typename T> T* unwrap()
+ {
+ return static_cast<T*>(m_private);
+ }
+
+ template<typename T> const T* constUnwrap() const
+ {
+ return static_cast<const T*>(m_private);
+ }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDOMEventListener.h b/Source/WebKit/chromium/public/WebDOMEventListener.h
new file mode 100644
index 0000000..4b32b93
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDOMEventListener.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 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 WebDOMEventListener_h
+#define WebDOMEventListener_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Node; }
+#endif
+
+namespace WebKit {
+
+class EventListenerWrapper;
+class WebDOMEvent;
+class WebDOMEventListenerPrivate;
+class WebNode;
+class WebString;
+
+class WebDOMEventListener {
+public:
+ WEBKIT_API WebDOMEventListener();
+ WEBKIT_API virtual ~WebDOMEventListener();
+
+ // Called when an event is received.
+ virtual void handleEvent(const WebDOMEvent&) = 0;
+
+#if WEBKIT_IMPLEMENTATION
+ void notifyEventListenerDeleted(EventListenerWrapper*);
+ EventListenerWrapper* createEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node);
+ EventListenerWrapper* getEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node);
+#endif
+
+private:
+ WebDOMEventListenerPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDOMMouseEvent.h b/Source/WebKit/chromium/public/WebDOMMouseEvent.h
new file mode 100644
index 0000000..4c38b56
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDOMMouseEvent.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 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 WebDOMMouseEvent_h
+#define WebDOMMouseEvent_h
+
+#include "WebDOMEvent.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Event; }
+#endif
+
+namespace WebKit {
+
+class WebDOMMouseEvent : public WebDOMEvent {
+public:
+ WEBKIT_API int screenX() const;
+ WEBKIT_API int screenY() const;
+ WEBKIT_API int clientX() const;
+ WEBKIT_API int clientY() const;
+ WEBKIT_API int layerX() const;
+ WEBKIT_API int layerY() const;
+ WEBKIT_API int offsetX() const;
+ WEBKIT_API int offsetY() const;
+ WEBKIT_API int pageX() const;
+ WEBKIT_API int pageY() const;
+ WEBKIT_API int x() const;
+ WEBKIT_API int y() const;
+
+ WEBKIT_API int button() const;
+ WEBKIT_API bool buttonDown() const;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDOMMutationEvent.h b/Source/WebKit/chromium/public/WebDOMMutationEvent.h
new file mode 100644
index 0000000..471331f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDOMMutationEvent.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 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 WebDOMMutationEvent_h
+#define WebDOMMutationEvent_h
+
+#include "WebDOMEvent.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Event; }
+#endif
+
+namespace WebKit {
+
+class WebDOMMutationEvent : public WebDOMEvent {
+public:
+ enum AttrChangeType {
+ Modification = 1,
+ Addition = 2,
+ Removal = 3
+ };
+
+ WEBKIT_API WebNode relatedNode() const;
+ WEBKIT_API WebString prevValue() const;
+ WEBKIT_API WebString newValue() const;
+ WEBKIT_API WebString attrName() const;
+ WEBKIT_API AttrChangeType attrChange() const;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDOMStringList.h b/Source/WebKit/chromium/public/WebDOMStringList.h
new file mode 100644
index 0000000..dabf1b7
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDOMStringList.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 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 WebDOMStringList_h
+#define WebDOMStringList_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+#include "WebString.h"
+
+namespace WebCore { class DOMStringList; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebDOMStringList {
+public:
+ ~WebDOMStringList() { reset(); }
+
+ WEBKIT_API WebDOMStringList();
+ WebDOMStringList(const WebDOMStringList& l) { assign(l); }
+ WebDOMStringList& operator=(const WebDOMStringList& l)
+ {
+ assign(l);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebDOMStringList&);
+
+ WEBKIT_API void append(const WebString&);
+ WEBKIT_API unsigned length() const;
+ WEBKIT_API WebString item(unsigned) const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebDOMStringList(const WTF::PassRefPtr<WebCore::DOMStringList>&);
+ WebDOMStringList& operator=(const WTF::PassRefPtr<WebCore::DOMStringList>&);
+ operator WTF::PassRefPtr<WebCore::DOMStringList>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::DOMStringList> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebData.h b/Source/WebKit/chromium/public/WebData.h
new file mode 100644
index 0000000..5874bed
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebData.h
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2009 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 WebData_h
+#define WebData_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class SharedBuffer; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebDataPrivate;
+
+// A container for raw bytes. It is inexpensive to copy a WebData object.
+//
+// WARNING: It is not safe to pass a WebData across threads!!!
+//
+class WebData {
+public:
+ ~WebData() { reset(); }
+
+ WebData() : m_private(0) { }
+
+ WebData(const char* data, size_t size) : m_private(0)
+ {
+ assign(data, size);
+ }
+
+ template <int N>
+ WebData(const char (&data)[N]) : m_private(0)
+ {
+ assign(data, N - 1);
+ }
+
+ WebData(const WebData& d) : m_private(0) { assign(d); }
+
+ WebData& operator=(const WebData& d)
+ {
+ assign(d);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebData&);
+ WEBKIT_API void assign(const char* data, size_t size);
+
+ WEBKIT_API size_t size() const;
+ WEBKIT_API const char* data() const;
+
+ bool isEmpty() const { return !size(); }
+ bool isNull() const { return !m_private; }
+
+#if WEBKIT_IMPLEMENTATION
+ WebData(const WTF::PassRefPtr<WebCore::SharedBuffer>&);
+ WebData& operator=(const WTF::PassRefPtr<WebCore::SharedBuffer>&);
+ operator WTF::PassRefPtr<WebCore::SharedBuffer>() const;
+#else
+ template <class C>
+ WebData(const C& c) : m_private(0)
+ {
+ assign(c.data(), c.size());
+ }
+
+ template <class C>
+ WebData& operator=(const C& c)
+ {
+ assign(c.data(), c.size());
+ return *this;
+ }
+#endif
+
+private:
+ void assign(WebDataPrivate*);
+ WebDataPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDataSource.h b/Source/WebKit/chromium/public/WebDataSource.h
new file mode 100644
index 0000000..1a8c270
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDataSource.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2009 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 WebDataSource_h
+#define WebDataSource_h
+
+#include "WebCommon.h"
+#include "WebNavigationType.h"
+
+namespace WebKit {
+
+class WebApplicationCacheHost;
+class WebString;
+class WebURL;
+class WebURLRequest;
+class WebURLResponse;
+template <typename T> class WebVector;
+
+class WebDataSource {
+public:
+ class ExtraData {
+ public:
+ virtual ~ExtraData() { }
+ };
+
+ // Returns the original request that resulted in this datasource.
+ virtual const WebURLRequest& originalRequest() const = 0;
+
+ // Returns the request corresponding to this datasource. It may
+ // include additional request headers added by WebKit that were not
+ // present in the original request. This request may also correspond
+ // to a location specified by a redirect that was followed.
+ virtual const WebURLRequest& request() const = 0;
+
+ // Returns the response associated with this datasource.
+ virtual const WebURLResponse& response() const = 0;
+
+ // When this datasource was created as a result of WebFrame::loadData,
+ // there may be an associated unreachableURL.
+ virtual bool hasUnreachableURL() const = 0;
+ virtual WebURL unreachableURL() const = 0;
+
+ // Returns all redirects that occurred (both client and server) before
+ // at last committing the current page. This will contain one entry
+ // for each intermediate URL, and one entry for the last URL (so if
+ // there are no redirects, it will contain exactly the current URL, and
+ // if there is one redirect, it will contain the source and destination
+ // URL).
+ virtual void redirectChain(WebVector<WebURL>&) const = 0;
+
+ // Returns the title for the current page.
+ virtual WebString pageTitle() const = 0;
+
+ // The type of navigation that triggered the creation of this datasource.
+ virtual WebNavigationType navigationType() const = 0;
+
+ // The time in seconds (since the epoch) of the event that triggered
+ // the creation of this datasource. Returns 0 if unknown.
+ virtual double triggeringEventTime() const = 0;
+
+ // Extra data associated with this datasource. If non-null, the extra
+ // data pointer will be deleted when the datasource is destroyed.
+ // Setting the extra data pointer will cause any existing non-null
+ // extra data pointer to be deleted.
+ virtual ExtraData* extraData() const = 0;
+ virtual void setExtraData(ExtraData*) = 0;
+
+ // The application cache host associated with this datasource.
+ virtual WebApplicationCacheHost* applicationCacheHost() = 0;
+
+ // Set deferMainResourceDataLoad flag on the loader. This is used for
+ // testing.
+ virtual void setDeferMainResourceDataLoad(bool) = 0;
+
+protected:
+ ~WebDataSource() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDatabase.h b/Source/WebKit/chromium/public/WebDatabase.h
new file mode 100644
index 0000000..0a5d4f8
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDatabase.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009 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 WebDatabase_h
+#define WebDatabase_h
+
+#include "WebCommon.h"
+#include "WebSecurityOrigin.h"
+
+namespace WebCore { class AbstractDatabase; }
+
+namespace WebKit {
+
+class WebDatabaseObserver;
+class WebString;
+
+class WebDatabase {
+public:
+ WEBKIT_API WebString name() const;
+ WEBKIT_API WebString displayName() const;
+ WEBKIT_API unsigned long estimatedSize() const;
+ WEBKIT_API WebSecurityOrigin securityOrigin() const;
+
+ WEBKIT_API static void setObserver(WebDatabaseObserver*);
+ WEBKIT_API static WebDatabaseObserver* observer();
+
+ WEBKIT_API static void updateDatabaseSize(
+ const WebString& originIdentifier, const WebString& databaseName,
+ unsigned long long databaseSize, unsigned long long spaceAvailable);
+ WEBKIT_API static void closeDatabaseImmediately(
+ const WebString& originIdentifier, const WebString& databaseName);
+
+#if WEBKIT_IMPLEMENTATION
+ WebDatabase(const WebCore::AbstractDatabase*);
+#endif
+
+private:
+ WebDatabase() { }
+ const WebCore::AbstractDatabase* m_database;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDatabaseObserver.h b/Source/WebKit/chromium/public/WebDatabaseObserver.h
new file mode 100644
index 0000000..da85c93
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDatabaseObserver.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 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 WebDatabaseObserver_h
+#define WebDatabaseObserver_h
+
+namespace WebKit {
+class WebDatabase;
+
+class WebDatabaseObserver {
+public:
+ virtual void databaseOpened(const WebDatabase&) = 0;
+ virtual void databaseModified(const WebDatabase&) = 0;
+ virtual void databaseClosed(const WebDatabase&) = 0;
+protected:
+ ~WebDatabaseObserver() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDevToolsAgent.h b/Source/WebKit/chromium/public/WebDevToolsAgent.h
new file mode 100644
index 0000000..d6a7bcd
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDevToolsAgent.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2009 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 WebDevToolsAgent_h
+#define WebDevToolsAgent_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_USING_V8
+namespace v8 {
+class Value;
+template <class T> class Handle;
+}
+#endif
+
+namespace WebKit {
+class WebDevToolsAgentClient;
+class WebDevToolsMessageTransport;
+class WebFrame;
+class WebString;
+class WebURLRequest;
+class WebURLResponse;
+class WebView;
+struct WebDevToolsMessageData;
+struct WebPoint;
+struct WebURLError;
+
+class WebDevToolsAgent {
+public:
+ virtual ~WebDevToolsAgent() {}
+
+ virtual void attach() = 0;
+ virtual void detach() = 0;
+ virtual void frontendLoaded() = 0;
+
+ virtual void didNavigate() = 0;
+
+ virtual void dispatchOnInspectorBackend(const WebString& message) = 0;
+
+ virtual void inspectElementAt(const WebPoint&) = 0;
+#if WEBKIT_USING_V8
+ virtual void inspectNode(v8::Handle<v8::Value>) = 0;
+#endif
+ virtual void setRuntimeProperty(const WebString& name, const WebString& value) = 0;
+
+ // Exposed for LayoutTestController.
+ virtual void evaluateInWebInspector(long callId, const WebString& script) = 0;
+ virtual void setTimelineProfilingEnabled(bool enabled) = 0;
+
+ // Asynchronously executes debugger command in the render thread.
+ // |callerIdentifier| will be used for sending response.
+ WEBKIT_API static void executeDebuggerCommand(
+ const WebString& command, int callerIdentifier);
+
+ // Asynchronously request debugger to pause immediately.
+ WEBKIT_API static void debuggerPauseScript();
+
+ class MessageDescriptor {
+ public:
+ virtual ~MessageDescriptor() { }
+ virtual WebDevToolsAgent* agent() = 0;
+ virtual WebString message() = 0;
+ };
+ // Asynchronously request debugger to pause immediately and run the command.
+ WEBKIT_API static void interruptAndDispatch(MessageDescriptor*);
+ WEBKIT_API static bool shouldInterruptForMessage(const WebString&);
+ WEBKIT_API static void processPendingMessages();
+
+ typedef void (*MessageLoopDispatchHandler)();
+
+ // Installs dispatch handle that is going to be called periodically
+ // while on a breakpoint.
+ WEBKIT_API static void setMessageLoopDispatchHandler(MessageLoopDispatchHandler);
+
+ virtual void identifierForInitialRequest(unsigned long resourceId, WebFrame*, const WebURLRequest&) = 0;
+ virtual void willSendRequest(unsigned long resourceId, WebURLRequest&) = 0;
+ virtual void didReceiveData(unsigned long resourceId, int length) = 0;
+ virtual void didReceiveResponse(unsigned long resourceId, const WebURLResponse&) = 0;
+ virtual void didFinishLoading(unsigned long resourceId) = 0;
+ virtual void didFailLoading(unsigned long resourceId, const WebURLError&) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDevToolsAgentClient.h b/Source/WebKit/chromium/public/WebDevToolsAgentClient.h
new file mode 100644
index 0000000..b373b60
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDevToolsAgentClient.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009 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 WebDevToolsAgentClient_h
+#define WebDevToolsAgentClient_h
+
+#include "WebCString.h"
+#include "WebCommon.h"
+
+namespace WebKit {
+class WebString;
+struct WebDevToolsMessageData;
+
+class WebDevToolsAgentClient {
+public:
+ virtual void sendMessageToInspectorFrontend(const WebString&) { }
+ virtual void sendDebuggerOutput(const WebString&) { }
+ virtual void sendDispatchToAPU(const WebString&) { }
+
+ // Returns the identifier of the entity hosting this agent.
+ virtual int hostIdentifier() { return -1; }
+
+ // Notifies host upon runtime feature being enabled/disabled.
+ virtual void runtimePropertyChanged(const WebString& name, const WebString& value) { }
+
+ virtual WebCString debuggerScriptSource() { return WebCString(); }
+
+ class WebKitClientMessageLoop {
+ public:
+ virtual ~WebKitClientMessageLoop() { }
+ virtual void run() = 0;
+ virtual void quitNow() = 0;
+ };
+ virtual WebKitClientMessageLoop* createClientMessageLoop() { return 0; }
+
+ virtual bool exposeV8DebuggerProtocol() { return false; }
+
+protected:
+ ~WebDevToolsAgentClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDevToolsFrontend.h b/Source/WebKit/chromium/public/WebDevToolsFrontend.h
new file mode 100644
index 0000000..0325f92
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDevToolsFrontend.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2009 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 WebDevToolsFrontend_h
+#define WebDevToolsFrontend_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebDevToolsFrontendClient;
+class WebString;
+class WebView;
+
+// WebDevToolsFrontend represents DevTools client sitting in the Glue. It provides
+// direct and delegate Apis to the host.
+class WebDevToolsFrontend {
+public:
+ WEBKIT_API static WebDevToolsFrontend* create(WebView* view,
+ WebDevToolsFrontendClient* client,
+ const WebString& applicationLocale);
+
+ virtual ~WebDevToolsFrontend() {}
+
+ virtual void dispatchOnInspectorFrontend(const WebString&) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h b/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h
new file mode 100644
index 0000000..df34dc5
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2009 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 WebDevToolsFrontendClient_h
+#define WebDevToolsFrontendClient_h
+
+namespace WebKit {
+
+class WebString;
+struct WebDevToolsMessageData;
+
+class WebDevToolsFrontendClient {
+public:
+ WebDevToolsFrontendClient() { }
+
+ virtual void sendFrontendLoaded() { }
+ virtual void sendMessageToBackend(const WebString&) { }
+ virtual void sendDebuggerCommandToAgent(const WebString& command) { }
+ virtual void sendDebuggerPauseScript() { }
+
+ virtual void activateWindow() { }
+ virtual void closeWindow() { }
+ virtual void requestDockWindow() { }
+ virtual void requestUndockWindow() { }
+
+ virtual bool shouldHideScriptsPanel() { return false; }
+
+protected:
+ virtual ~WebDevToolsFrontendClient() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDeviceOrientation.h b/Source/WebKit/chromium/public/WebDeviceOrientation.h
new file mode 100644
index 0000000..7e8aa72
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDeviceOrientation.h
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2010 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 WebDeviceOrientation_h
+#define WebDeviceOrientation_h
+
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+namespace WebCore { class DeviceOrientation; }
+#endif
+
+namespace WebKit {
+
+class WebDeviceOrientation {
+public:
+ WebDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
+ : m_isNull(false),
+ m_canProvideAlpha(canProvideAlpha),
+ m_alpha(alpha),
+ m_canProvideBeta(canProvideBeta),
+ m_beta(beta),
+ m_canProvideGamma(canProvideGamma),
+ m_gamma(gamma)
+ {
+ }
+
+ static WebDeviceOrientation nullOrientation() { return WebDeviceOrientation(); }
+
+ bool isNull() { return m_isNull; }
+ bool canProvideAlpha() { return m_canProvideAlpha; }
+ double alpha() { return m_alpha; }
+ bool canProvideBeta() { return m_canProvideBeta; }
+ double beta() { return m_beta; }
+ bool canProvideGamma() { return m_canProvideGamma; }
+ double gamma() { return m_gamma; }
+
+#if WEBKIT_IMPLEMENTATION
+ WebDeviceOrientation(const WTF::PassRefPtr<WebCore::DeviceOrientation>&);
+ WebDeviceOrientation& operator=(const WTF::PassRefPtr<WebCore::DeviceOrientation>&);
+ operator WTF::PassRefPtr<WebCore::DeviceOrientation>() const;
+#endif
+
+private:
+ WebDeviceOrientation()
+ : m_isNull(true),
+ m_canProvideAlpha(false),
+ m_alpha(0),
+ m_canProvideBeta(false),
+ m_beta(0),
+ m_canProvideGamma(false),
+ m_gamma(0)
+ {
+ }
+
+ bool m_isNull;
+ bool m_canProvideAlpha;
+ double m_alpha;
+ bool m_canProvideBeta;
+ double m_beta;
+ bool m_canProvideGamma;
+ double m_gamma;
+};
+
+} // namespace WebKit
+
+#endif // WebDeviceOrientation_h
diff --git a/Source/WebKit/chromium/public/WebDeviceOrientationClient.h b/Source/WebKit/chromium/public/WebDeviceOrientationClient.h
new file mode 100644
index 0000000..4df8665
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDeviceOrientationClient.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2010 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 WebDeviceOrientationClient_h
+#define WebDeviceOrientationClient_h
+
+namespace WebKit {
+
+class WebDeviceOrientation;
+class WebDeviceOrientationController;
+
+class WebDeviceOrientationClient {
+public:
+ virtual ~WebDeviceOrientationClient() {}
+
+ virtual void setController(WebDeviceOrientationController*) = 0;
+ virtual void startUpdating() = 0;
+ virtual void stopUpdating() = 0;
+
+ virtual WebDeviceOrientation lastOrientation() const = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebDeviceOrientationClient_h
diff --git a/Source/WebKit/chromium/public/WebDeviceOrientationClientMock.h b/Source/WebKit/chromium/public/WebDeviceOrientationClientMock.h
new file mode 100644
index 0000000..7fae792
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDeviceOrientationClientMock.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2010 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 WebDeviceOrientationClientMock_h
+#define WebDeviceOrientationClientMock_h
+
+#include "WebCommon.h"
+#include "WebDeviceOrientationClient.h"
+#include "WebPrivateOwnPtr.h"
+
+namespace WebCore { class DeviceOrientationClientMock; }
+
+namespace WebKit {
+
+class WebDeviceOrientationClientMock : public WebDeviceOrientationClient {
+public:
+ WEBKIT_API static WebDeviceOrientationClientMock* create();
+ ~WebDeviceOrientationClientMock() { reset(); }
+
+ virtual void setController(WebDeviceOrientationController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual WebDeviceOrientation lastOrientation() const;
+
+ WEBKIT_API void setOrientation(WebDeviceOrientation&);
+
+private:
+ WebDeviceOrientationClientMock() { initialize(); }
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+
+ WebPrivateOwnPtr<WebCore::DeviceOrientationClientMock> m_clientMock;
+};
+
+} // namespace WebKit
+
+#endif // WebDeviceOrientationClientMock_h
diff --git a/Source/WebKit/chromium/public/WebDeviceOrientationController.h b/Source/WebKit/chromium/public/WebDeviceOrientationController.h
new file mode 100644
index 0000000..ef843ee
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDeviceOrientationController.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 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 WebDeviceOrientationController_h
+#define WebDeviceOrientationController_h
+
+#include "WebCommon.h"
+
+namespace WebCore { class DeviceOrientationController; }
+
+namespace WebKit {
+
+class WebDeviceOrientation;
+
+class WebDeviceOrientationController {
+public:
+ WebDeviceOrientationController(WebCore::DeviceOrientationController* c)
+ : m_controller(c)
+ {
+ }
+
+ WEBKIT_API void didChangeDeviceOrientation(const WebDeviceOrientation&);
+
+#if WEBKIT_IMPLEMENTATION
+ WebCore::DeviceOrientationController* controller() const;
+#endif
+
+private:
+ WebCore::DeviceOrientationController* m_controller;
+};
+
+} // namespace WebKit
+
+#endif // WebDeviceOrientationController_h
diff --git a/Source/WebKit/chromium/public/WebDocument.h b/Source/WebKit/chromium/public/WebDocument.h
new file mode 100644
index 0000000..d9f7386
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDocument.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2009 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 WebDocument_h
+#define WebDocument_h
+
+#include "WebNode.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore {
+class Document;
+class DocumentType;
+}
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebDocumentType;
+class WebElement;
+class WebFrame;
+class WebNodeCollection;
+class WebNodeList;
+class WebString;
+class WebURL;
+
+// Provides readonly access to some properties of a DOM document.
+class WebDocument : public WebNode {
+public:
+ WebDocument() { }
+ WebDocument(const WebDocument& e) : WebNode(e) { }
+
+ WebDocument& operator=(const WebDocument& e)
+ {
+ WebNode::assign(e);
+ return *this;
+ }
+ void assign(const WebDocument& e) { WebNode::assign(e); }
+
+ // Returns the frame the document belongs to or 0 if the document is frameless.
+ WEBKIT_API WebFrame* frame() const;
+ WEBKIT_API bool isHTMLDocument() const;
+ WEBKIT_API bool isXHTMLDocument() const;
+ WEBKIT_API bool isPluginDocument() const;
+ WEBKIT_API WebURL baseURL() const;
+ WEBKIT_API WebURL firstPartyForCookies() const;
+ WEBKIT_API WebElement documentElement() const;
+ WEBKIT_API WebElement body() const;
+ WEBKIT_API WebElement head();
+ WEBKIT_API WebString title() const;
+ WEBKIT_API WebNodeCollection all();
+ WEBKIT_API WebURL completeURL(const WebString&) const;
+ WEBKIT_API WebElement getElementById(const WebString&) const;
+ WEBKIT_API WebNode focusedNode() const;
+ WEBKIT_API WebDocumentType doctype() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebDocument(const WTF::PassRefPtr<WebCore::Document>&);
+ WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&);
+ operator WTF::PassRefPtr<WebCore::Document>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDocumentType.h b/Source/WebKit/chromium/public/WebDocumentType.h
new file mode 100644
index 0000000..b339320
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDocumentType.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 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 WebDocumentType_h
+#define WebDocumentType_h
+
+#include "WebNode.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class DocumentType; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebString;
+
+// Provides readonly access to some properties of a DOM document type.
+class WebDocumentType : public WebNode {
+public:
+ WebDocumentType() { }
+ WebDocumentType(const WebDocumentType& e) : WebNode(e) { }
+
+ WebDocumentType& operator=(const WebDocumentType& e)
+ {
+ WebNode::assign(e);
+ return *this;
+ }
+ void assign(const WebDocumentType& e) { WebNode::assign(e); }
+
+ WEBKIT_API WebString name() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebDocumentType(const WTF::PassRefPtr<WebCore::DocumentType>&);
+ WebDocumentType& operator=(const WTF::PassRefPtr<WebCore::DocumentType>&);
+ operator WTF::PassRefPtr<WebCore::DocumentType>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDragData.h b/Source/WebKit/chromium/public/WebDragData.h
new file mode 100644
index 0000000..1d704f0
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDragData.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2009 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 WebDragData_h
+#define WebDragData_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class ChromiumDataObject; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebData;
+class WebDragDataPrivate;
+class WebString;
+class WebURL;
+template <typename T> class WebVector;
+
+// Holds data that may be exchanged through a drag-n-drop operation. It is
+// inexpensive to copy a WebDragData object.
+class WebDragData {
+public:
+ ~WebDragData() { reset(); }
+
+ WebDragData() : m_private(0) { }
+ WebDragData(const WebDragData& d) : m_private(0) { assign(d); }
+ WebDragData& operator=(const WebDragData& d)
+ {
+ assign(d);
+ return *this;
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebDragData&);
+
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebString url() const;
+ WEBKIT_API void setURL(const WebURL&);
+
+ WEBKIT_API WebString urlTitle() const;
+ WEBKIT_API void setURLTitle(const WebString&);
+
+ WEBKIT_API WebString downloadMetadata() const;
+ WEBKIT_API void setDownloadMetadata(const WebString&);
+
+ WEBKIT_API WebString fileExtension() const;
+ WEBKIT_API void setFileExtension(const WebString&);
+
+ WEBKIT_API bool containsFilenames() const;
+ WEBKIT_API void filenames(WebVector<WebString>&) const;
+ WEBKIT_API void setFilenames(const WebVector<WebString>&);
+ WEBKIT_API void appendToFilenames(const WebString&);
+
+ WEBKIT_API WebString plainText() const;
+ WEBKIT_API void setPlainText(const WebString&);
+
+ WEBKIT_API WebString htmlText() const;
+ WEBKIT_API void setHTMLText(const WebString&);
+
+ WEBKIT_API WebURL htmlBaseURL() const;
+ WEBKIT_API void setHTMLBaseURL(const WebURL&);
+
+ WEBKIT_API WebString fileContentFilename() const;
+ WEBKIT_API void setFileContentFilename(const WebString&);
+
+ WEBKIT_API WebData fileContent() const;
+ WEBKIT_API void setFileContent(const WebData&);
+
+#if WEBKIT_IMPLEMENTATION
+ WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&);
+ WebDragData& operator=(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&);
+ operator WTF::PassRefPtr<WebCore::ChromiumDataObject>() const;
+#endif
+
+private:
+ void assign(WebDragDataPrivate*);
+ void ensureMutable();
+ WebDragDataPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebDragOperation.h b/Source/WebKit/chromium/public/WebDragOperation.h
new file mode 100644
index 0000000..050b74f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebDragOperation.h
@@ -0,0 +1,59 @@
+/*
+* Copyright (C) 2009 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 WebDragOperation_h
+#define WebDragOperation_h
+
+#include <limits.h>
+
+namespace WebKit {
+
+// "Verb" of a drag-and-drop operation as negotiated between the source and
+// destination.
+// (These constants match their equivalents in WebCore's DragActions.h and
+// should not be renumbered.)
+enum WebDragOperation {
+ WebDragOperationNone = 0,
+ WebDragOperationCopy = 1,
+ WebDragOperationLink = 2,
+ WebDragOperationGeneric = 4,
+ WebDragOperationPrivate = 8,
+ WebDragOperationMove = 16,
+ WebDragOperationDelete = 32,
+ WebDragOperationEvery = UINT_MAX
+};
+
+// Alternate typedef to make it clear when this is being used as a mask
+// with potentially multiple value bits set.
+typedef WebDragOperation WebDragOperationsMask;
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebEditingAction.h b/Source/WebKit/chromium/public/WebEditingAction.h
new file mode 100644
index 0000000..4e76100
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebEditingAction.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2009 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 WebEditingAction_h
+#define WebEditingAction_h
+
+namespace WebKit {
+
+enum WebEditingAction {
+ WebEditingActionTyped,
+ WebEditingActionPasted,
+ WebEditingActionDropped,
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebElement.h b/Source/WebKit/chromium/public/WebElement.h
new file mode 100644
index 0000000..8d51e98
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebElement.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2009 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 WebElement_h
+#define WebElement_h
+
+#include "WebNode.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Element; }
+#endif
+
+namespace WebKit {
+class WebNamedNodeMap;
+
+ // Provides access to some properties of a DOM element node.
+ class WebElement : public WebNode {
+ public:
+ WebElement() : WebNode() { }
+ WebElement(const WebElement& e) : WebNode(e) { }
+
+ WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; }
+ void assign(const WebElement& e) { WebNode::assign(e); }
+
+ WEBKIT_API bool isFormControlElement() const;
+ WEBKIT_API bool isTextFormControlElement() const;
+ WEBKIT_API WebString tagName() const;
+ WEBKIT_API bool hasTagName(const WebString&) const;
+ WEBKIT_API bool hasAttribute(const WebString&) const;
+ WEBKIT_API WebString getAttribute(const WebString&) const;
+ WEBKIT_API bool setAttribute(const WebString& name, const WebString& value);
+ WEBKIT_API WebNamedNodeMap attributes() const;
+ WEBKIT_API WebString innerText() const;
+
+ // Returns the language code specified for this element. This attribute
+ // is inherited, so the returned value is drawn from the closest parent
+ // element that has the lang attribute set, or from the HTTP
+ // "Content-Language" header as a fallback.
+ WEBKIT_API WebString computeInheritedLanguage() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebElement(const WTF::PassRefPtr<WebCore::Element>&);
+ WebElement& operator=(const WTF::PassRefPtr<WebCore::Element>&);
+ operator WTF::PassRefPtr<WebCore::Element>() const;
+#endif
+ };
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebExceptionCode.h b/Source/WebKit/chromium/public/WebExceptionCode.h
new file mode 100644
index 0000000..61d53d9
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebExceptionCode.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 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 WebExceptionCode_h
+#define WebExceptionCode_h
+
+namespace WebKit {
+
+// This should match how ExceptionCode is defined in WebCore.
+typedef int WebExceptionCode;
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebExternalPopupMenu.h b/Source/WebKit/chromium/public/WebExternalPopupMenu.h
new file mode 100644
index 0000000..49630cf
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebExternalPopupMenu.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2010 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 WebExternalPopupMenu_h
+#define WebExternalPopupMenu_h
+
+namespace WebKit {
+
+struct WebRect;
+
+class WebExternalPopupMenu {
+public:
+ virtual void show(const WebRect& bounds) = 0;
+ virtual void close() = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebExternalPopupMenu_h
diff --git a/Source/WebKit/chromium/public/WebExternalPopupMenuClient.h b/Source/WebKit/chromium/public/WebExternalPopupMenuClient.h
new file mode 100644
index 0000000..e01bc2d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebExternalPopupMenuClient.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 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 WebExternalPopupMenuClient_h
+#define WebExternalPopupMenuClient_h
+
+namespace WebKit {
+
+class WebExternalPopupMenuClient {
+public:
+ // Should be called when the currently selected item in the popup menu
+ // changed. Can be -1 if there is no selection.
+ virtual void didChangeSelection(int index) = 0;
+
+ // Should be called when an index has been accepted.
+ // Note that it is not safe to access this WebExternalPopupClientMenu after
+ // this has been called as it might not be valid anymore.
+ virtual void didAcceptIndex(int index) = 0;
+
+ // Should be called when the popup menu was discarded (closed without a
+ // selection.
+ // Note that it is not safe to access this WebExternalPopupClientMenu after
+ // this has been called as it might not be valid anymore.
+ virtual void didCancel() = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebExternalPopupMenuClient_h
diff --git a/Source/WebKit/chromium/public/WebFileChooserCompletion.h b/Source/WebKit/chromium/public/WebFileChooserCompletion.h
new file mode 100644
index 0000000..14bace4
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileChooserCompletion.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 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 WebFileChooserCompletion_h
+#define WebFileChooserCompletion_h
+
+namespace WebKit {
+
+class WebString;
+template <typename T> class WebVector;
+
+// Gets called back when WebViewClient finished choosing a file.
+class WebFileChooserCompletion {
+public:
+ // Called with zero or more file names. Zero-lengthed vector means that
+ // the user cancelled or that file choosing failed. The callback instance
+ // is destroyed when this method is called.
+ virtual void didChooseFile(const WebVector<WebString>& fileNames) = 0;
+protected:
+ virtual ~WebFileChooserCompletion() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFileChooserParams.h b/Source/WebKit/chromium/public/WebFileChooserParams.h
new file mode 100644
index 0000000..8e56d70
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileChooserParams.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 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 WebFileChooserParams_h
+#define WebFileChooserParams_h
+
+#include "WebFileChooserCompletion.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+struct WebFileChooserParams {
+ // If |multiSelect| is true, the dialog allow to select multiple files.
+ bool multiSelect;
+ // If |directory| is true, the dialog allows the user to select a directory.
+ bool directory;
+ // |title| is a title of a file chooser dialog. It can be an empty string.
+ WebString title;
+ // |initialValue| is a filename which the dialog should select by default.
+ // It can be an empty string.
+ WebString initialValue;
+ // |acceptTypes| has a comma-separated MIME types such as "audio/*,text/plain".
+ // The dialog may restrict selectable files to the specified MIME types.
+ // This value comes from an 'accept' attribute value of an INPUT element.
+ // So it might be a wrong formatted string.
+ WebString acceptTypes;
+ // |selectedFiles| has filenames which a file upload control already select.
+ // A WebViewClient implementation may ask a user to select
+ // - removing a file from the selected files,
+ // - appending other files, or
+ // - replacing with other files
+ // before opening a file chooser dialog.
+ WebVector<WebString> selectedFiles;
+
+ WebFileChooserParams()
+ : multiSelect(false)
+ , directory(false)
+ {
+ }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFileError.h b/Source/WebKit/chromium/public/WebFileError.h
new file mode 100644
index 0000000..e7a17c3
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileError.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 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 WebFileError_h
+#define WebFileError_h
+
+namespace WebKit {
+
+// File-related error code defined in HTML5 File API.
+enum WebFileError {
+ WebFileErrorNotFound = 1,
+ WebFileErrorSecurity = 2,
+ WebFileErrorAbort = 3,
+ WebFileErrorNotReadable = 4,
+ WebFileErrorEncoding = 5,
+ WebFileErrorNoModificationAllowed = 6,
+ WebFileErrorInvalidState = 7,
+ WebFileErrorSyntax = 8,
+ WebFileErrorInvalidModification = 9,
+ WebFileErrorQuotaExceeded = 10,
+ WebFileErrorTypeMismatch = 11,
+ WebFileErrorPathExists = 12,
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFileInfo.h b/Source/WebKit/chromium/public/WebFileInfo.h
new file mode 100644
index 0000000..be0b3e4
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileInfo.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 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 WebFileInfo_h
+#define WebFileInfo_h
+
+namespace WebKit {
+
+struct WebFileInfo {
+ // The last modification time of the file, in seconds.
+ // The value 0.0 means that the time is not set.
+ double modificationTime;
+
+ // The length of the file in bytes.
+ // The value -1 means that the length is not set.
+ long long length;
+
+ enum Type {
+ TypeUnknown = 0,
+ TypeFile,
+ TypeDirectory
+ };
+
+ Type type;
+
+ WebFileInfo() : modificationTime(0.0), length(-1), type(TypeUnknown) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFileSystem.h b/Source/WebKit/chromium/public/WebFileSystem.h
new file mode 100644
index 0000000..7198f31
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileSystem.h
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2010 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 WebFileSystem_h
+#define WebFileSystem_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebFileSystemCallbacks;
+class WebFileWriter;
+class WebFileWriterClient;
+
+class WebFileSystem {
+public:
+ enum Type {
+ TypeTemporary,
+ TypePersistent,
+ };
+
+ // Moves a file or directory at |srcPath| to |destPath|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void move(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Copies a file or directory at |srcPath| to |destPath|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void copy(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Deletes a file or directory at a given |path|.
+ // It is an error to try to remove a directory that is not empty.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void remove(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Deletes a file or directory recursively at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void removeRecursively(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Retrieves the metadata information of the file or directory at the given |path|.
+ // WebFileSystemCallbacks::didReadMetadata() must be called with a valid metadata when the retrieval is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void readMetadata(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Creates a file at given |path|.
+ // If the |path| doesn't exist, it creates a new file at |path|.
+ // If |exclusive| is true, it fails if the |path| already exists.
+ // If |exclusive| is false, it succeeds if the |path| already exists or
+ // it has successfully created a new file at |path|.
+ //
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void createFile(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Creates a directory at a given |path|.
+ // If the |path| doesn't exist, it creates a new directory at |path|.
+ // If |exclusive| is true, it fails if the |path| already exists.
+ // If |exclusive| is false, it succeeds if the |path| already exists or it has successfully created a new directory at |path|.
+ //
+ // WebFileSystemCallbacks::didSucceed() must be called when
+ // the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void createDirectory(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Checks if a file exists at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void fileExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Checks if a directory exists at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void directoryExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Reads directory entries of a given directory at |path|.
+ // WebFileSystemCallbacks::didReadDirectory() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void readDirectory(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Creates a WebFileWriter that can be used to write to the given file.
+ // This is a fast, synchronous call, and should not stat the filesystem.
+ virtual WebFileWriter* createFileWriter(const WebString& path, WebFileWriterClient*) { WEBKIT_ASSERT_NOT_REACHED(); return 0; }
+
+protected:
+ virtual ~WebFileSystem() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFileSystemCallbacks.h b/Source/WebKit/chromium/public/WebFileSystemCallbacks.h
new file mode 100644
index 0000000..fa7ebbe
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileSystemCallbacks.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 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 WebFileSystemCallbacks_h
+#define WebFileSystemCallbacks_h
+
+#include "WebFileError.h"
+#include "WebFileSystemEntry.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebString;
+struct WebFileInfo;
+
+class WebFileSystemCallbacks {
+public:
+ // Callback for WebFileSystem's various operations that don't require
+ // return values.
+ virtual void didSucceed() = 0;
+
+ // Callback for WebFileSystem::readMetadata. Called with the file metadata
+ // for the requested path.
+ virtual void didReadMetadata(const WebFileInfo&) = 0;
+
+ // Callback for WebFileSystem::readDirectory. Called with a vector of
+ // file entries in the requested directory. This callback might be called
+ // multiple times if the directory has many entries. |hasMore| must be
+ // true when there are more entries.
+ virtual void didReadDirectory(const WebVector<WebFileSystemEntry>&, bool hasMore) = 0;
+
+ // Callback for WebFrameClient::openFileSystem. Called with a name and
+ // root path for the FileSystem when the request is accepted.
+ virtual void didOpenFileSystem(const WebString& name, const WebString& rootPath) = 0;
+
+ // Called with an error code when a requested operation hasn't been
+ // completed.
+ virtual void didFail(WebFileError) = 0;
+
+protected:
+ virtual ~WebFileSystemCallbacks() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFileSystemEntry.h b/Source/WebKit/chromium/public/WebFileSystemEntry.h
new file mode 100644
index 0000000..00a5e38
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileSystemEntry.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 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 WebFileSystemEntry_h
+#define WebFileSystemEntry_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+struct WebFileSystemEntry {
+ WebFileSystemEntry() : isDirectory(false) { }
+
+ // The name of the entry.
+ WebString name;
+
+ // This flag indicates if the entry is directory or not.
+ bool isDirectory;
+};
+
+} // namespace WebKit
+
+#endif // WebFileSystemEntry_h
diff --git a/Source/WebKit/chromium/public/WebFileUtilities.h b/Source/WebKit/chromium/public/WebFileUtilities.h
new file mode 100644
index 0000000..c8876f2
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileUtilities.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2010 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 WebFileUtilities_h
+#define WebFileUtilities_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+#ifdef WIN32
+typedef void *HANDLE;
+#endif
+
+namespace WebKit {
+
+class WebFileUtilities {
+public:
+#ifdef WIN32
+ typedef HANDLE FileHandle;
+#else
+ typedef int FileHandle;
+#endif
+ virtual void revealFolderInOS(const WebString& path) { }
+ virtual bool fileExists(const WebString& path) { return false; }
+ virtual bool deleteFile(const WebString& path) { return false; }
+ virtual bool deleteEmptyDirectory(const WebString& path) { return false; }
+ virtual bool getFileSize(const WebString& path, long long& result) { return false; }
+ virtual bool getFileModificationTime(const WebString& path, double& result) { return false; }
+ virtual WebString directoryName(const WebString& path) { return WebString(); }
+ virtual WebString pathByAppendingComponent(const WebString& path, const WebString& component) { return WebString(); }
+ virtual bool makeAllDirectories(const WebString& path) { return false; }
+ virtual WebString getAbsolutePath(const WebString& path) { return WebString(); }
+ virtual bool isDirectory(const WebString& path) { return false; }
+ virtual WebURL filePathToURL(const WebString& path) { return WebURL(); }
+ virtual FileHandle openFile(const WebString& path, int mode) { return FileHandle(); }
+ // Should set the FileHandle to a invalid value if the file is closed successfully.
+ virtual void closeFile(FileHandle&) { }
+ virtual long long seekFile(FileHandle, long long offset, int origin) { return 0; }
+ virtual bool truncateFile(FileHandle, long long offset) { return false; }
+ virtual int readFromFile(FileHandle, char* data, int length) { return 0; }
+ virtual int writeToFile(FileHandle, const char* data, int length) { return 0; }
+
+protected:
+ ~WebFileUtilities() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFileWriter.h b/Source/WebKit/chromium/public/WebFileWriter.h
new file mode 100644
index 0000000..9cde098
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileWriter.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 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 WebFileWriter_h
+#define WebFileWriter_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebURL;
+
+class WebFileWriter {
+public:
+ virtual ~WebFileWriter() { }
+
+ // Only one write or one truncate operation can be in progress at a time.
+ // These functions are asynchronous and will report results through the WebFileWriter's associated WebFileWriterClient.
+ virtual void write(long long position, const WebURL& blobURL) = 0;
+ virtual void truncate(long long length) = 0;
+
+ // Cancel will attempt to abort a running write or truncate. However, it may not be possible to cancel an in-progress action, or the call may have come in too late. Partial writes are possible.
+ // Do not call cancel when there is no write or truncate in progress.
+ virtual void cancel() = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFileWriterClient.h b/Source/WebKit/chromium/public/WebFileWriterClient.h
new file mode 100644
index 0000000..46ff153
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFileWriterClient.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 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 WebFileWriterClient_h
+#define WebFileWriterClient_h
+
+#include "WebCommon.h"
+#include "WebFileError.h"
+
+namespace WebKit {
+
+class WebFileWriterClient {
+public:
+ // Called for each chunk of a write, to indicate progress.
+ // On the final chunk, when the write is finished, complete will be true.
+ virtual void didWrite(long long bytes, bool complete) = 0;
+
+ // Called once when the truncate completes successfully.
+ virtual void didTruncate() = 0;
+
+ // Called if the write or truncate fails, or if it is cancelled before the write or truncate completes. Completion of an operation will be signalled exactly once, either by didFail, didTruncate, or didWrite(..., true).
+ virtual void didFail(WebFileError) = 0;
+
+protected:
+ virtual ~WebFileWriterClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFindOptions.h b/Source/WebKit/chromium/public/WebFindOptions.h
new file mode 100644
index 0000000..93d48d3
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFindOptions.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2009 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 WebFindOptions_h
+#define WebFindOptions_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+// Options used when performing a find-in-page query.
+struct WebFindOptions {
+ // Whether to search forward or backward within the page.
+ bool forward;
+
+ // Whether search should be case-sensitive.
+ bool matchCase;
+
+ // Whether this operation is the first request or a follow-up.
+ bool findNext;
+
+ WebFindOptions()
+ : forward(true)
+ , matchCase(false)
+ , findNext(false) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFloatPoint.h b/Source/WebKit/chromium/public/WebFloatPoint.h
new file mode 100644
index 0000000..c053ed6
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFloatPoint.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2010 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 WebFloatPoint_h
+#define WebFloatPoint_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "IntPoint.h"
+#endif
+
+namespace WebKit {
+
+struct WebFloatPoint {
+ float x;
+ float y;
+
+ WebFloatPoint()
+ : x(0.0f)
+ , y(0.0f)
+ {
+ }
+
+ WebFloatPoint(float x, float y)
+ : x(x)
+ , y(y)
+ {
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebFloatPoint(const WebCore::FloatPoint& p)
+ : x(p.x())
+ , y(p.y())
+ {
+ }
+
+ WebFloatPoint& operator=(const WebCore::FloatPoint& p)
+ {
+ x = p.x();
+ y = p.y();
+ return *this;
+ }
+
+ operator WebCore::FloatPoint() const
+ {
+ return WebCore::FloatPoint(x, y);
+ }
+#endif
+};
+
+inline bool operator==(const WebFloatPoint& a, const WebFloatPoint& b)
+{
+ return a.x == b.x && a.y == b.y;
+}
+
+inline bool operator!=(const WebFloatPoint& a, const WebFloatPoint& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFloatRect.h b/Source/WebKit/chromium/public/WebFloatRect.h
new file mode 100644
index 0000000..a883513
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFloatRect.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2010 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 WebFloatRect_h
+#define WebFloatRect_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "FloatRect.h"
+#endif
+
+namespace WebKit {
+
+struct WebFloatRect {
+ float x;
+ float y;
+ float width;
+ float height;
+
+ bool isEmpty() const { return width <= 0 || height <= 0; }
+
+ WebFloatRect()
+ : x(0.0f)
+ , y(0.0f)
+ , width(0.0f)
+ , height(0.0f)
+ {
+ }
+
+ WebFloatRect(float x, float y, float width, float height)
+ : x(x)
+ , y(y)
+ , width(width)
+ , height(height)
+ {
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebFloatRect(const WebCore::FloatRect& r)
+ : x(r.x())
+ , y(r.y())
+ , width(r.width())
+ , height(r.height())
+ {
+ }
+
+ WebFloatRect& operator=(const WebCore::FloatRect& r)
+ {
+ x = r.x();
+ y = r.y();
+ width = r.width();
+ height = r.height();
+ return *this;
+ }
+
+ operator WebCore::FloatRect() const
+ {
+ return WebCore::FloatRect(x, y, width, height);
+ }
+#endif
+};
+
+inline bool operator==(const WebFloatRect& a, const WebFloatRect& b)
+{
+ return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;
+}
+
+inline bool operator!=(const WebFloatRect& a, const WebFloatRect& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFont.h b/Source/WebKit/chromium/public/WebFont.h
new file mode 100644
index 0000000..a20d52f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFont.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2010 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 WebFont_h
+#define WebFont_h
+
+#include "WebCanvas.h"
+#include "WebColor.h"
+#include "WebCommon.h"
+
+namespace WebKit {
+
+struct WebFontDescription;
+struct WebFloatPoint;
+struct WebFloatRect;
+struct WebPoint;
+struct WebRect;
+struct WebTextRun;
+
+class WebFont {
+public:
+ virtual ~WebFont() { }
+
+ WEBKIT_API static WebFont* create(const WebFontDescription&);
+
+ virtual WebFontDescription fontDescription() const = 0;
+
+ virtual int ascent() const = 0;
+ virtual int descent() const = 0;
+ virtual int height() const = 0;
+ virtual int lineSpacing() const = 0;
+ virtual float xHeight() const = 0;
+
+ // Draws the text run to the given canvas. The text is positioned at the
+ // given left-hand point at the baseline.
+ //
+ // The text will be clipped to the given clip rect. |canvasIsOpaque| is
+ // used to control whether subpixel antialiasing is possible. If there is a
+ // possibility the area drawn could be semi-transparent, subpixel
+ // antialiasing will be disabled.
+ //
+ // |from| and |to| allow the caller to specify a subrange of the given text
+ // run to draw. If |to| is -1, the entire run will be drawn.
+ virtual void drawText(WebCanvas*, const WebTextRun&, const WebFloatPoint& leftBaseline, WebColor,
+ const WebRect& clip, bool canvasIsOpaque,
+ int from = 0, int to = -1) const = 0;
+
+ // Measures the width in pixels of the given text run.
+ virtual int calculateWidth(const WebTextRun&) const = 0;
+
+ // Returns the character offset corresponding to the given horizontal pixel
+ // position as measured from from the left of the run.
+ virtual int offsetForPosition(const WebTextRun&, float position) const = 0;
+
+ // Returns the rectangle representing the selection rect for the subrange
+ // |from| -> |to| of the given text run. You can use -1 for |to| to specify
+ // the entire run (this will do something similar to calling width()).
+ //
+ // The rect will be positioned as if the text was drawn at the given
+ // |leftBaseline| position. |height| indicates the height of the selection
+ // rect you want, typically this will just be the height() of this font.
+ //
+ // To get the pixel offset of some character (the opposite of
+ // offsetForPosition()), pass in a |leftBaseline| = (0, 0), |from| = 0, and
+ // |to| = the character you want. The right edge of the resulting selection
+ // rect will tell you the right side of the character.
+ virtual WebFloatRect selectionRectForText(const WebTextRun&, const WebFloatPoint& leftBaseline,
+ int height, int from = 0, int to = -1) const = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFontCache.h b/Source/WebKit/chromium/public/WebFontCache.h
new file mode 100644
index 0000000..05aadc7
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFontCache.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 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 WebFontCache_h
+#define WebFontCache_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// An interface to query and configure WebKit's font cache.
+class WebFontCache {
+public:
+ // Returns the number of items in the font data cache.
+ WEBKIT_API static size_t fontDataCount();
+
+ // Returns the number of inactive items in the font data cache.
+ WEBKIT_API static size_t inactiveFontDataCount();
+
+ // Clears the cache.
+ WEBKIT_API static void clear();
+
+private:
+ WebFontCache(); // Not intended to be instanced.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFontDescription.h b/Source/WebKit/chromium/public/WebFontDescription.h
new file mode 100644
index 0000000..d4bb07e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFontDescription.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2010 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 WebFontDescription_h
+#define WebFontDescription_h
+
+#include "WebString.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class FontDescription; }
+#endif
+
+namespace WebKit {
+
+struct WebFontDescription {
+ enum GenericFamily {
+ GenericFamilyNone,
+ GenericFamilyStandard,
+ GenericFamilySerif,
+ GenericFamilySansSerif,
+ GenericFamilyMonospace,
+ GenericFamilyCursive,
+ GenericFamilyFantasy
+ };
+
+ enum Smoothing {
+ SmoothingAuto,
+ SmoothingNone,
+ SmoothingGrayscale,
+ SmoothingSubpixel
+ };
+
+ enum Weight {
+ Weight100,
+ Weight200,
+ Weight300,
+ Weight400,
+ Weight500,
+ Weight600,
+ Weight700,
+ Weight800,
+ Weight900,
+ WeightNormal = Weight400,
+ WeightBold = Weight700
+ };
+
+ WebFontDescription()
+ : genericFamily(GenericFamilyNone)
+ , size(0)
+ , italic(false)
+ , smallCaps(false)
+ , weight(WeightNormal)
+ , smoothing(SmoothingAuto)
+ , letterSpacing(0)
+ , wordSpacing(0)
+ {
+ }
+
+ WebString family;
+ GenericFamily genericFamily;
+ float size;
+ bool italic;
+ bool smallCaps;
+ Weight weight;
+ Smoothing smoothing;
+
+ short letterSpacing;
+ short wordSpacing;
+
+#if WEBKIT_IMPLEMENTATION
+ WebFontDescription(const WebCore::FontDescription&, short fontLetterSpacing, short fontWordSpacing);
+
+ operator WebCore::FontDescription() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFormControlElement.h b/Source/WebKit/chromium/public/WebFormControlElement.h
new file mode 100644
index 0000000..56a02dd
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFormControlElement.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 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 WebFormControlElement_h
+#define WebFormControlElement_h
+
+#include "WebElement.h"
+#include "WebString.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLFormControlElement; }
+#endif
+
+namespace WebKit {
+
+// Provides readonly access to some properties of a DOM form control element node.
+class WebFormControlElement : public WebElement {
+public:
+ WebFormControlElement() : WebElement() { }
+ WebFormControlElement(const WebFormControlElement& e) : WebElement(e) { }
+
+ WebFormControlElement& operator=(const WebFormControlElement& e)
+ {
+ WebElement::assign(e);
+ return *this;
+ }
+ void assign(const WebFormControlElement& e) { WebElement::assign(e); }
+
+ WEBKIT_API bool isEnabled() const;
+ WEBKIT_API WebString formControlName() const;
+ WEBKIT_API WebString formControlType() const;
+
+ // Returns the name that should be used for the specified |element| when
+ // storing autofill data. This is either the field name or its id, an empty
+ // string if it has no name and no id.
+ WEBKIT_API WebString nameForAutofill() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebFormControlElement(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>&);
+ WebFormControlElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLFormControlElement>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFormElement.h b/Source/WebKit/chromium/public/WebFormElement.h
new file mode 100644
index 0000000..53554d7
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFormElement.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2009 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 WebFormElement_h
+#define WebFormElement_h
+
+#include "WebElement.h"
+#include "WebVector.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLFormElement; }
+#endif
+
+namespace WebKit {
+
+ class WebInputElement;
+ class WebFormControlElement;
+
+ // A container for passing around a reference to a form element. Provides
+ // some information about the form.
+ class WebFormElement : public WebElement {
+ public:
+ ~WebFormElement() { reset(); }
+
+ WebFormElement() : WebElement() { }
+ WebFormElement(const WebFormElement& element) : WebElement(element) { }
+
+ WebFormElement& operator=(const WebFormElement& element)
+ {
+ WebElement::assign(element);
+ return *this;
+ }
+ void assign(const WebFormElement& element) { WebElement::assign(element); }
+
+ WEBKIT_API bool autoComplete() const;
+ WEBKIT_API WebString action() const;
+ WEBKIT_API WebString name() const;
+ WEBKIT_API WebString method() const;
+ WEBKIT_API bool wasUserSubmitted() const;
+ WEBKIT_API void submit();
+ // FIXME: Deprecate and replace with WebVector<WebElement>.
+ WEBKIT_API void getNamedElements(const WebString&, WebVector<WebNode>&);
+ WEBKIT_API void getFormControlElements(WebVector<WebFormControlElement>&) const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebFormElement(const WTF::PassRefPtr<WebCore::HTMLFormElement>&);
+ WebFormElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLFormElement>() const;
+#endif
+ };
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFrame.h b/Source/WebKit/chromium/public/WebFrame.h
new file mode 100644
index 0000000..c2a0650
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFrame.h
@@ -0,0 +1,579 @@
+/*
+ * Copyright (C) 2009 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 WebFrame_h
+#define WebFrame_h
+
+#include "WebCanvas.h"
+#include "WebNode.h"
+#include "WebURL.h"
+
+struct NPObject;
+
+#if WEBKIT_USING_V8
+namespace v8 {
+class Context;
+class Value;
+template <class T> class Handle;
+template <class T> class Local;
+}
+#endif
+
+namespace WebKit {
+
+class WebAnimationController;
+class WebData;
+class WebDataSource;
+class WebDocument;
+class WebElement;
+class WebFormElement;
+class WebHistoryItem;
+class WebInputElement;
+class WebPasswordAutocompleteListener;
+class WebPerformance;
+class WebRange;
+class WebSecurityOrigin;
+class WebString;
+class WebURL;
+class WebURLLoader;
+class WebURLRequest;
+class WebView;
+struct WebConsoleMessage;
+struct WebFindOptions;
+struct WebRect;
+struct WebScriptSource;
+struct WebSize;
+template <typename T> class WebVector;
+
+// FIXME(jam): take this out once Chromium has this
+#define WEBFRAME_PRINTBEGIN_TAKES_NODE
+
+class WebFrame {
+public:
+ // Returns the number of live WebFrame objects, used for leak checking.
+ WEBKIT_API static int instanceCount();
+
+ // The two functions below retrieve the WebFrame instances relating the
+ // currently executing JavaScript. Since JavaScript can make function
+ // calls across frames, though, we need to be more precise.
+ //
+ // For example, imagine that a JS function in frame A calls a function
+ // in frame B, which calls native code, which wants to know what the
+ // 'active' frame is.
+ //
+ // The 'entered context' is the context where execution first entered
+ // the script engine; the context that is at the bottom of the JS
+ // function stack. frameForEnteredContext() would return frame A in
+ // our example.
+ //
+ // The 'current context' is the context the JS engine is currently
+ // inside of; the context that is at the top of the JS function stack.
+ // frameForCurrentContext() would return frame B in our example.
+ WEBKIT_API static WebFrame* frameForEnteredContext();
+ WEBKIT_API static WebFrame* frameForCurrentContext();
+
+ // Returns the frame inside a given frame or iframe element. Returns 0 if
+ // the given element is not a frame, iframe or if the frame is empty.
+ WEBKIT_API static WebFrame* fromFrameOwnerElement(const WebElement&);
+
+
+ // Basic properties ---------------------------------------------------
+
+ // The name of this frame.
+ virtual WebString name() const = 0;
+
+ // Sets the name of this frame. For child frames (frames that are not a
+ // top-most frame) the actual name may have a suffix appended to make the
+ // frame name unique within the hierarchy.
+ virtual void setName(const WebString&) = 0;
+
+ // A globally unique identifier for this frame.
+ virtual long long identifier() const = 0;
+
+ // The url of the document loaded in this frame. This is equivalent to
+ // dataSource()->request().url().
+ virtual WebURL url() const = 0;
+
+ // The url of the favicon (if any) specified by the document loaded in
+ // this frame.
+ virtual WebURL favIconURL() const = 0;
+
+ // The url of the OpenSearch Desription Document (if any) specified by
+ // the document loaded in this frame.
+ virtual WebURL openSearchDescriptionURL() const = 0;
+
+ // Return the frame's encoding.
+ virtual WebString encoding() const = 0;
+
+
+ // Geometry -----------------------------------------------------------
+
+ // NOTE: These routines do not force page layout so their results may
+ // not be accurate if the page layout is out-of-date.
+
+ // If set to false, do not draw scrollbars on this frame's view.
+ virtual void setCanHaveScrollbars(bool) = 0;
+
+ // The scroll offset from the top-left corner of the frame in pixels.
+ virtual WebSize scrollOffset() const = 0;
+
+ // The size of the contents area.
+ virtual WebSize contentsSize() const = 0;
+
+ // Returns the minimum preferred width of the content contained in the
+ // current document.
+ virtual int contentsPreferredWidth() const = 0;
+
+ // Returns the scroll height of the document element. This is
+ // equivalent to the DOM property of the same name, and is the minimum
+ // height required to display the document without scrollbars.
+ virtual int documentElementScrollHeight() const = 0;
+
+ // Returns true if the contents (minus scrollbars) has non-zero area.
+ virtual bool hasVisibleContent() const = 0;
+
+
+ // Hierarchy ----------------------------------------------------------
+
+ // Returns the containing view.
+ virtual WebView* view() const = 0;
+
+ // Returns the frame that opened this frame or 0 if there is none.
+ virtual WebFrame* opener() const = 0;
+
+ // Returns the parent frame or 0 if this is a top-most frame.
+ virtual WebFrame* parent() const = 0;
+
+ // Returns the top-most frame in the hierarchy containing this frame.
+ virtual WebFrame* top() const = 0;
+
+ // Returns the first/last child frame.
+ virtual WebFrame* firstChild() const = 0;
+ virtual WebFrame* lastChild() const = 0;
+
+ // Returns the next/previous sibling frame.
+ virtual WebFrame* nextSibling() const = 0;
+ virtual WebFrame* previousSibling() const = 0;
+
+ // Returns the next/previous frame in "frame traversal order"
+ // optionally wrapping around.
+ virtual WebFrame* traverseNext(bool wrap) const = 0;
+ virtual WebFrame* traversePrevious(bool wrap) const = 0;
+
+ // Returns the child frame identified by the given name.
+ virtual WebFrame* findChildByName(const WebString& name) const = 0;
+
+ // Returns the child frame identified by the given xpath expression.
+ virtual WebFrame* findChildByExpression(const WebString& xpath) const = 0;
+
+
+ // Content ------------------------------------------------------------
+
+ virtual WebDocument document() const = 0;
+
+ virtual void forms(WebVector<WebFormElement>&) const = 0;
+
+ virtual WebAnimationController* animationController() = 0;
+
+ virtual WebPerformance performance() const = 0;
+
+
+ // Scripting ----------------------------------------------------------
+
+ // Returns the security origin of the current document.
+ virtual WebSecurityOrigin securityOrigin() const = 0;
+
+ // This grants the currently loaded document access to all security
+ // origins (including file URLs). Use with care. The access is
+ // revoked when a new document is loaded into this frame.
+ virtual void grantUniversalAccess() = 0;
+
+ // Returns a NPObject corresponding to this frame's DOMWindow.
+ virtual NPObject* windowObject() const = 0;
+
+ // Binds a NPObject as a property of this frame's DOMWindow.
+ virtual void bindToWindowObject(const WebString& name, NPObject*) = 0;
+
+ // Executes script in the context of the current page.
+ virtual void executeScript(const WebScriptSource&) = 0;
+
+ // Executes JavaScript in a new world associated with the web frame.
+ // The script gets its own global scope and its own prototypes for
+ // intrinsic JavaScript objects (String, Array, and so-on). It also
+ // gets its own wrappers for all DOM nodes and DOM constructors.
+ // extensionGroup is an embedder-provided specifier that controls which
+ // v8 extensions are loaded into the new context - see
+ // WebKit::registerExtension for the corresponding specifier.
+ virtual void executeScriptInIsolatedWorld(
+ int worldId, const WebScriptSource* sources, unsigned numSources,
+ int extensionGroup) = 0;
+
+ // Logs to the console associated with this frame.
+ virtual void addMessageToConsole(const WebConsoleMessage&) = 0;
+
+ // Calls window.gc() if it is defined.
+ virtual void collectGarbage() = 0;
+
+#if WEBKIT_USING_V8
+ // Executes script in the context of the current page and returns the value
+ // that the script evaluated to.
+ virtual v8::Handle<v8::Value> executeScriptAndReturnValue(
+ const WebScriptSource&) = 0;
+
+ // Returns the V8 context for this frame, or an empty handle if there
+ // is none.
+ virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0;
+#endif
+
+
+ // Styling -------------------------------------------------------------
+
+ // Insert the given text as a STYLE element at the beginning of the
+ // document. |elementId| can be empty, but if specified then it is used
+ // as the id for the newly inserted element (replacing an existing one
+ // with the same id, if any).
+ virtual bool insertStyleText(const WebString& styleText,
+ const WebString& elementId) = 0;
+
+
+ // Navigation ----------------------------------------------------------
+
+ // Reload the current document.
+ // True |ignoreCache| explicitly bypasses caches.
+ // False |ignoreCache| revalidates any existing cache entries.
+ virtual void reload(bool ignoreCache = false) = 0;
+
+ // Load the given URL.
+ virtual void loadRequest(const WebURLRequest&) = 0;
+
+ // Load the given history state, corresponding to a back/forward
+ // navigation.
+ virtual void loadHistoryItem(const WebHistoryItem&) = 0;
+
+ // Loads the given data with specific mime type and optional text
+ // encoding. For HTML data, baseURL indicates the security origin of
+ // the document and is used to resolve links. If specified,
+ // unreachableURL is reported via WebDataSource::unreachableURL. If
+ // replace is false, then this data will be loaded as a normal
+ // navigation. Otherwise, the current history item will be replaced.
+ virtual void loadData(const WebData& data,
+ const WebString& mimeType,
+ const WebString& textEncoding,
+ const WebURL& baseURL,
+ const WebURL& unreachableURL = WebURL(),
+ bool replace = false) = 0;
+
+ // This method is short-hand for calling LoadData, where mime_type is
+ // "text/html" and text_encoding is "UTF-8".
+ virtual void loadHTMLString(const WebData& html,
+ const WebURL& baseURL,
+ const WebURL& unreachableURL = WebURL(),
+ bool replace = false) = 0;
+
+ // Returns true if the current frame is busy loading content.
+ virtual bool isLoading() const = 0;
+
+ // Stops any pending loads on the frame and its children.
+ virtual void stopLoading() = 0;
+
+ // Returns the data source that is currently loading. May be null.
+ virtual WebDataSource* provisionalDataSource() const = 0;
+
+ // Returns the data source that is currently loaded.
+ virtual WebDataSource* dataSource() const = 0;
+
+ // Returns the previous history item. Check WebHistoryItem::isNull()
+ // before using.
+ virtual WebHistoryItem previousHistoryItem() const = 0;
+
+ // Returns the current history item. Check WebHistoryItem::isNull()
+ // before using.
+ virtual WebHistoryItem currentHistoryItem() const = 0;
+
+ // View-source rendering mode. Set this before loading an URL to cause
+ // it to be rendered in view-source mode.
+ virtual void enableViewSourceMode(bool) = 0;
+ virtual bool isViewSourceModeEnabled() const = 0;
+
+ // Sets the referrer for the given request to be the specified URL or
+ // if that is null, then it sets the referrer to the referrer that the
+ // frame would use for subresources. NOTE: This method also filters
+ // out invalid referrers (e.g., it is invalid to send a HTTPS URL as
+ // the referrer for a HTTP request).
+ virtual void setReferrerForRequest(WebURLRequest&, const WebURL&) = 0;
+
+ // Called to associate the WebURLRequest with this frame. The request
+ // will be modified to inherit parameters that allow it to be loaded.
+ // This method ends up triggering WebFrameClient::willSendRequest.
+ // DEPRECATED: Please use createAssociatedURLLoader instead.
+ virtual void dispatchWillSendRequest(WebURLRequest&) = 0;
+
+ // Returns a WebURLLoader that is associated with this frame. The loader
+ // will, for example, be cancelled when WebFrame::stopLoading is called.
+ // FIXME: stopLoading does not yet cancel an associated loader!!
+ virtual WebURLLoader* createAssociatedURLLoader() = 0;
+
+ // Called from within WebFrameClient::didReceiveDocumentData to commit
+ // data for the frame that will be used to construct the frame's
+ // document.
+ virtual void commitDocumentData(const char* data, size_t length) = 0;
+
+ // Returns the number of registered unload listeners.
+ virtual unsigned unloadListenerCount() const = 0;
+
+ // Returns true if a user gesture is currently being processed.
+ virtual bool isProcessingUserGesture() const = 0;
+
+ // Returns true if this frame is in the process of opening a new frame
+ // with a suppressed opener.
+ virtual bool willSuppressOpenerInNewFrame() const = 0;
+
+
+ // Editing -------------------------------------------------------------
+
+ // Replaces the selection with the given text.
+ virtual void replaceSelection(const WebString& text) = 0;
+
+ virtual void insertText(const WebString& text) = 0;
+
+ virtual void setMarkedText(const WebString& text, unsigned location, unsigned length) = 0;
+ virtual void unmarkText() = 0;
+ virtual bool hasMarkedText() const = 0;
+
+ virtual WebRange markedRange() const = 0;
+
+ virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0;
+
+ // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll,
+ // Unselect, etc. See EditorCommand.cpp for the full list of supported
+ // commands.
+ virtual bool executeCommand(const WebString&) = 0;
+ virtual bool executeCommand(const WebString&, const WebString& value) = 0;
+ virtual bool isCommandEnabled(const WebString&) const = 0;
+
+ // Spell-checking support.
+ virtual void enableContinuousSpellChecking(bool) = 0;
+ virtual bool isContinuousSpellCheckingEnabled() const = 0;
+
+
+ // Selection -----------------------------------------------------------
+
+ virtual bool hasSelection() const = 0;
+
+ virtual WebRange selectionRange() const = 0;
+
+ virtual WebString selectionAsText() const = 0;
+ virtual WebString selectionAsMarkup() const = 0;
+
+ // Expands the selection to a word around the caret and returns
+ // true. Does nothing and returns false if there is no caret or
+ // there is ranged selection.
+ virtual bool selectWordAroundCaret() = 0;
+
+
+ // Printing ------------------------------------------------------------
+
+ // Reformats the WebFrame for printing. pageSize is the page size in
+ // points (a point in 1/72 of an inch). If |constrainToNode| node is
+ // specified, then only the given node is printed (for now only plugins are
+ // supported), instead of the entire frame. printerDPI is the user
+ // selected, DPI for the printer. Returns the number of pages that can be
+ // printed at the given page size. The out param useBrowserOverlays
+ // specifies whether the browser process should use its overlays (header,
+ // footer, margins etc) or whether the renderer controls this.
+ virtual int printBegin(const WebSize& pageSize,
+ const WebNode& constrainToNode = WebNode(),
+ int printerDPI = 72,
+ bool* useBrowserOverlays = 0) = 0;
+
+ // Returns the page shrinking factor calculated by webkit (usually
+ // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or
+ // not in printing mode.
+ virtual float getPrintPageShrink(int page) = 0;
+
+ // Prints one page, and returns the calculated page shrinking factor
+ // (usually between 1/1.25 and 1/2). Returns 0 if the page number is
+ // invalid or not in printing mode.
+ virtual float printPage(int pageToPrint, WebCanvas*) = 0;
+
+ // Reformats the WebFrame for screen display.
+ virtual void printEnd() = 0;
+
+ // CSS3 Paged Media ----------------------------------------------------
+
+ // Returns true if page box (margin boxes and page borders) is visible.
+ virtual bool isPageBoxVisible(int pageIndex) = 0;
+
+ // Returns the preferred page size and margins in pixels, assuming 96
+ // pixels per inch. pageSize, marginTop, marginRight, marginBottom,
+ // marginLeft must be initialized to the default values that are used if
+ // auto is specified.
+ virtual void pageSizeAndMarginsInPixels(int pageIndex,
+ WebSize& pageSize,
+ int& marginTop,
+ int& marginRight,
+ int& marginBottom,
+ int& marginLeft) = 0;
+
+ // Find-in-page --------------------------------------------------------
+
+ // Searches a frame for a given string.
+ //
+ // If a match is found, this function will select it (scrolling down to
+ // make it visible if needed) and fill in selectionRect with the
+ // location of where the match was found (in window coordinates).
+ //
+ // If no match is found, this function clears all tickmarks and
+ // highlighting.
+ //
+ // Returns true if the search string was found, false otherwise.
+ virtual bool find(int identifier,
+ const WebString& searchText,
+ const WebFindOptions& options,
+ bool wrapWithinFrame,
+ WebRect* selectionRect) = 0;
+
+ // Notifies the frame that we are no longer interested in searching.
+ // This will abort any asynchronous scoping effort already under way
+ // (see the function scopeStringMatches for details) and erase all
+ // tick-marks and highlighting from the previous search. If
+ // clearSelection is true, it will also make sure the end state for the
+ // find operation does not leave a selection. This can occur when the
+ // user clears the search string but does not close the find box.
+ virtual void stopFinding(bool clearSelection) = 0;
+
+ // Counts how many times a particular string occurs within the frame.
+ // It also retrieves the location of the string and updates a vector in
+ // the frame so that tick-marks and highlighting can be drawn. This
+ // function does its work asynchronously, by running for a certain
+ // time-slice and then scheduling itself (co-operative multitasking) to
+ // be invoked later (repeating the process until all matches have been
+ // found). This allows multiple frames to be searched at the same time
+ // and provides a way to cancel at any time (see
+ // cancelPendingScopingEffort). The parameter searchText specifies
+ // what to look for and |reset| signals whether this is a brand new
+ // request or a continuation of the last scoping effort.
+ virtual void scopeStringMatches(int identifier,
+ const WebString& searchText,
+ const WebFindOptions& options,
+ bool reset) = 0;
+
+ // Cancels any outstanding requests for scoping string matches on a frame.
+ virtual void cancelPendingScopingEffort() = 0;
+
+ // This function is called on the main frame during the scoping effort
+ // to keep a running tally of the accumulated total match-count for all
+ // frames. After updating the count it will notify the WebViewClient
+ // about the new count.
+ virtual void increaseMatchCount(int count, int identifier) = 0;
+
+ // This function is called on the main frame to reset the total number
+ // of matches found during the scoping effort.
+ virtual void resetMatchCount() = 0;
+
+
+ // Password autocompletion ---------------------------------------------
+
+ // Registers a listener for the specified user name input element. The
+ // listener will receive notifications for blur and when autocomplete
+ // should be triggered.
+ // An element can have only one listener. If a listener already exists,
+ // this method returns false and does not add the new one.
+ // Either way, the WebFrame becomes the owner of the passed listener.
+ virtual bool registerPasswordListener(
+ WebInputElement,
+ WebPasswordAutocompleteListener*) = 0;
+
+ // Dispatches an Autocompletion notification to registered listener if one
+ // exists that is registered against the WebInputElement specified.
+ virtual void notifiyPasswordListenerOfAutocomplete(
+ const WebInputElement&) = 0;
+
+
+ // Utility -------------------------------------------------------------
+
+ // Returns the contents of this frame as a string. If the text is
+ // longer than maxChars, it will be clipped to that length. WARNING:
+ // This function may be slow depending on the number of characters
+ // retrieved and page complexity. For a typically sized page, expect
+ // it to take on the order of milliseconds.
+ //
+ // If there is room, subframe text will be recursively appended. Each
+ // frame will be separated by an empty line.
+ virtual WebString contentAsText(size_t maxChars) const = 0;
+
+ // Returns HTML text for the contents of this frame. This is generated
+ // from the DOM.
+ virtual WebString contentAsMarkup() const = 0;
+
+ // Returns a text representation of the render tree. This method is used
+ // to support layout tests.
+ virtual WebString renderTreeAsText() const = 0;
+
+ // Returns the counter value for the specified element. This method is
+ // used to support layout tests.
+ virtual WebString counterValueForElementById(const WebString& id) const = 0;
+
+ // Calls markerTextForListItem() defined in WebCore/rendering/RenderTreeAsText.h.
+ virtual WebString markerTextForListItem(const WebElement&) const = 0;
+
+ // Returns the number of page where the specified element will be put.
+ // This method is used to support layout tests.
+ virtual int pageNumberForElementById(const WebString& id,
+ float pageWidthInPixels,
+ float pageHeightInPixels) const = 0;
+
+ // Returns the bounds rect for current selection. If selection is performed
+ // on transformed text, the rect will still bound the selection but will
+ // not be transformed itself. If no selection is present, the rect will be
+ // empty ((0,0), (0,0)).
+ virtual WebRect selectionBoundsRect() const = 0;
+
+ // Only for testing purpose:
+ // Returns true if selection.anchorNode has a marker on range from |from| with |length|.
+ virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const = 0;
+
+ // Pauses and samples an SVG animation. Returns false if there's no svg
+ // animation to pause. This is only for testing.
+ virtual bool pauseSVGAnimation(const WebString& animationId,
+ double time,
+ const WebString& elementId) = 0;
+
+ // Dumps the layer tree, used by the accelerated compositor, in
+ // text form. This is used only by layout tests.
+ virtual WebString layerTreeAsText() const = 0;
+
+protected:
+ ~WebFrame() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebFrameClient.h b/Source/WebKit/chromium/public/WebFrameClient.h
new file mode 100644
index 0000000..1c6fd04
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebFrameClient.h
@@ -0,0 +1,371 @@
+/*
+ * Copyright (C) 2010 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 WebFrameClient_h
+#define WebFrameClient_h
+
+#include "WebCommon.h"
+#include "WebFileSystem.h"
+#include "WebNavigationPolicy.h"
+#include "WebNavigationType.h"
+#include "WebURLError.h"
+
+namespace WebKit {
+
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
+class WebCookieJar;
+class WebDataSource;
+class WebFormElement;
+class WebFrame;
+class WebMediaPlayer;
+class WebMediaPlayerClient;
+class WebNode;
+class WebPlugin;
+class WebSecurityOrigin;
+class WebSharedWorker;
+class WebString;
+class WebURL;
+class WebURLRequest;
+class WebURLResponse;
+class WebWorker;
+class WebWorkerClient;
+struct WebPluginParams;
+struct WebRect;
+struct WebSize;
+struct WebURLError;
+
+class WebFrameClient {
+public:
+ // Factory methods -----------------------------------------------------
+
+ // May return null.
+ virtual WebPlugin* createPlugin(WebFrame*, const WebPluginParams&) { return 0; }
+
+ // May return null.
+ virtual WebWorker* createWorker(WebFrame*, WebWorkerClient*) { return 0; }
+
+ // May return null.
+ virtual WebSharedWorker* createSharedWorker(WebFrame*, const WebURL&, const WebString&, unsigned long long) { return 0; }
+
+ // May return null.
+ virtual WebMediaPlayer* createMediaPlayer(WebFrame*, WebMediaPlayerClient*) { return 0; }
+
+ // May return null.
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient*) { return 0; }
+
+
+ // Services ------------------------------------------------------------
+
+ // A frame specific cookie jar. May return null, in which case
+ // WebKitClient::cookieJar() will be called to access cookies.
+ virtual WebCookieJar* cookieJar(WebFrame*) { return 0; }
+
+
+ // General notifications -----------------------------------------------
+
+ // This frame has been detached from the view.
+ //
+ // FIXME: Do not use this in new code. Currently this is used by code in
+ // Chromium that errantly caches WebKit objects.
+ virtual void frameDetached(WebFrame*) { }
+
+ // This frame is about to be closed.
+ virtual void willClose(WebFrame*) { }
+
+ // Controls whether plugins are allowed for this frame.
+ virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+
+ // Notifies the client that the frame would have instantiated a plug-in if plug-ins were enabled.
+ virtual void didNotAllowPlugins(WebFrame*) { }
+
+ // Controls whether images are allowed for this frame.
+ virtual bool allowImages(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+
+
+ // Load commands -------------------------------------------------------
+
+ // The client should handle the navigation externally.
+ virtual void loadURLExternally(
+ WebFrame*, const WebURLRequest&, WebNavigationPolicy) { }
+
+
+ // Navigational queries ------------------------------------------------
+
+ // The client may choose to alter the navigation policy. Otherwise,
+ // defaultPolicy should just be returned.
+ virtual WebNavigationPolicy decidePolicyForNavigation(
+ WebFrame*, const WebURLRequest&, WebNavigationType,
+ const WebNode& originatingNode,
+ WebNavigationPolicy defaultPolicy, bool isRedirect) { return defaultPolicy; }
+
+ // Query if the specified request can be handled.
+ virtual bool canHandleRequest(
+ WebFrame*, const WebURLRequest& request) { return true; }
+
+ // Returns an error corresponding to canHandledRequest() returning false.
+ virtual WebURLError cannotHandleRequestError(
+ WebFrame*, const WebURLRequest& request) { return WebURLError(); }
+
+ // Returns an error corresponding to a user cancellation event.
+ virtual WebURLError cancelledError(
+ WebFrame*, const WebURLRequest& request) { return WebURLError(); }
+
+ // Notify that a URL cannot be handled.
+ virtual void unableToImplementPolicyWithError(
+ WebFrame*, const WebURLError&) { }
+
+
+ // Navigational notifications ------------------------------------------
+
+ // A form submission has been requested, but the page's submit event handler
+ // hasn't yet had a chance to run (and possibly alter/interrupt the submit.)
+ virtual void willSendSubmitEvent(WebFrame*, const WebFormElement&) { }
+
+ // A form submission is about to occur.
+ virtual void willSubmitForm(WebFrame*, const WebFormElement&) { }
+
+ // A client-side redirect will occur. This may correspond to a <META
+ // refresh> or some script activity.
+ virtual void willPerformClientRedirect(
+ WebFrame*, const WebURL& from, const WebURL& to,
+ double interval, double fireTime) { }
+
+ // A client-side redirect was cancelled.
+ virtual void didCancelClientRedirect(WebFrame*) { }
+
+ // A client-side redirect completed.
+ virtual void didCompleteClientRedirect(WebFrame*, const WebURL& fromURL) { }
+
+ // A datasource has been created for a new navigation. The given
+ // datasource will become the provisional datasource for the frame.
+ virtual void didCreateDataSource(WebFrame*, WebDataSource*) { }
+
+ // A new provisional load has been started.
+ virtual void didStartProvisionalLoad(WebFrame*) { }
+
+ // The provisional load was redirected via a HTTP 3xx response.
+ virtual void didReceiveServerRedirectForProvisionalLoad(WebFrame*) { }
+
+ // The provisional load failed.
+ virtual void didFailProvisionalLoad(WebFrame*, const WebURLError&) { }
+
+ // Notifies the client to commit data for the given frame. The client
+ // may optionally prevent default processing by setting preventDefault
+ // to true before returning. If default processing is prevented, then
+ // it is up to the client to manually call commitDocumentData on the
+ // WebFrame. It is only valid to call commitDocumentData within a call
+ // to didReceiveDocumentData. If commitDocumentData is not called,
+ // then an empty document will be loaded.
+ virtual void didReceiveDocumentData(
+ WebFrame*, const char* data, size_t length, bool& preventDefault) { }
+
+ // The provisional datasource is now committed. The first part of the
+ // response body has been received, and the encoding of the response
+ // body is known.
+ virtual void didCommitProvisionalLoad(WebFrame*, bool isNewNavigation) { }
+
+ // The window object for the frame has been cleared of any extra
+ // properties that may have been set by script from the previously
+ // loaded document.
+ virtual void didClearWindowObject(WebFrame*) { }
+
+ // The document element has been created.
+ virtual void didCreateDocumentElement(WebFrame*) { }
+
+ // The page title is available.
+ virtual void didReceiveTitle(WebFrame*, const WebString& title) { }
+
+ // The icons for the page have changed.
+ virtual void didChangeIcons(WebFrame*) { }
+
+ // The frame's document finished loading.
+ virtual void didFinishDocumentLoad(WebFrame*) { }
+
+ // The 'load' event was dispatched.
+ virtual void didHandleOnloadEvents(WebFrame*) { }
+
+ // The frame's document or one of its subresources failed to load.
+ virtual void didFailLoad(WebFrame*, const WebURLError&) { }
+
+ // The frame's document and all of its subresources succeeded to load.
+ virtual void didFinishLoad(WebFrame*) { }
+
+ // The navigation resulted in no change to the documents within the page.
+ // For example, the navigation may have just resulted in scrolling to a
+ // named anchor or a PopState event may have been dispatched.
+ virtual void didNavigateWithinPage(WebFrame*, bool isNewNavigation) { }
+
+ // The navigation resulted in scrolling the page to a named anchor instead
+ // of downloading a new document.
+ virtual void didChangeLocationWithinPage(WebFrame*) { }
+
+ // Called upon update to scroll position, document state, and other
+ // non-navigational events related to the data held by WebHistoryItem.
+ // WARNING: This method may be called very frequently.
+ virtual void didUpdateCurrentHistoryItem(WebFrame*) { }
+
+
+ // Low-level resource notifications ------------------------------------
+
+ // An identifier was assigned to the specified request. The client
+ // should remember this association if interested in subsequent events.
+ virtual void assignIdentifierToRequest(
+ WebFrame*, unsigned identifier, const WebURLRequest&) { }
+
+ // Remove the association between an identifier assigned to a request if
+ // the client keeps such an association.
+ virtual void removeIdentifierForRequest(unsigned identifier) { }
+
+ // A request is about to be sent out, and the client may modify it. Request
+ // is writable, and changes to the URL, for example, will change the request
+ // made. If this request is the result of a redirect, then redirectResponse
+ // will be non-null and contain the response that triggered the redirect.
+ virtual void willSendRequest(
+ WebFrame*, unsigned identifier, WebURLRequest&,
+ const WebURLResponse& redirectResponse) { }
+
+ // Response headers have been received for the resource request given
+ // by identifier.
+ virtual void didReceiveResponse(
+ WebFrame*, unsigned identifier, const WebURLResponse&) { }
+
+ // The resource request given by identifier succeeded.
+ virtual void didFinishResourceLoad(
+ WebFrame*, unsigned identifier) { }
+
+ // The resource request given by identifier failed.
+ virtual void didFailResourceLoad(
+ WebFrame*, unsigned identifier, const WebURLError&) { }
+
+ // The specified request was satified from WebCore's memory cache.
+ virtual void didLoadResourceFromMemoryCache(
+ WebFrame*, const WebURLRequest&, const WebURLResponse&) { }
+
+ // This frame has displayed inactive content (such as an image) from an
+ // insecure source. Inactive content cannot spread to other frames.
+ virtual void didDisplayInsecureContent(WebFrame*) { }
+
+ // The indicated security origin has run active content (such as a
+ // script) from an insecure source. Note that the insecure content can
+ // spread to other frames in the same origin.
+ virtual void didRunInsecureContent(WebFrame*, const WebSecurityOrigin&) { }
+
+
+ // Script notifications ------------------------------------------------
+
+ // Controls whether scripts are allowed to execute for this frame.
+ virtual bool allowScript(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+
+ // Controls whether access to Web Databases is allowed for this frame.
+ virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) { return true; }
+
+ // Notifies the client that the frame would have executed script if script were enabled.
+ virtual void didNotAllowScript(WebFrame*) { }
+
+ // Script in the page tried to allocate too much memory.
+ virtual void didExhaustMemoryAvailableForScript(WebFrame*) { }
+
+ // Notifies that a new script context has been created for this frame.
+ // This is similar to didClearWindowObject but only called once per
+ // frame context.
+ virtual void didCreateScriptContext(WebFrame*) { }
+
+ // Notifies that this frame's script context has been destroyed.
+ virtual void didDestroyScriptContext(WebFrame*) { }
+
+ // Notifies that a garbage-collected context was created - content
+ // scripts.
+ virtual void didCreateIsolatedScriptContext(WebFrame*) { }
+
+ // Controls whether the given script extension should run in a new script
+ // context in this frame. If extensionGroup is 0, the script context is the
+ // frame's main context. Otherwise, it is a context created by
+ // WebFrame::executeScriptInIsolatedWorld with that same extensionGroup
+ // value.
+ virtual bool allowScriptExtension(WebFrame*, const WebString& extensionName, int extensionGroup) { return true; }
+
+
+ // Geometry notifications ----------------------------------------------
+
+ // The frame's document finished the initial layout of a page.
+ virtual void didFirstLayout(WebFrame*) { }
+
+ // The frame's document finished the initial non-empty layout of a page.
+ virtual void didFirstVisuallyNonEmptyLayout(WebFrame*) { }
+
+ // The size of the content area changed.
+ virtual void didChangeContentsSize(WebFrame*, const WebSize&) { }
+
+ // The main frame scrolled.
+ virtual void didChangeScrollOffset(WebFrame*) { }
+
+
+ // Find-in-page notifications ------------------------------------------
+
+ // Notifies how many matches have been found so far, for a given
+ // identifier. |finalUpdate| specifies whether this is the last update
+ // (all frames have completed scoping).
+ virtual void reportFindInPageMatchCount(
+ int identifier, int count, bool finalUpdate) { }
+
+ // Notifies what tick-mark rect is currently selected. The given
+ // identifier lets the client know which request this message belongs
+ // to, so that it can choose to ignore the message if it has moved on
+ // to other things. The selection rect is expected to have coordinates
+ // relative to the top left corner of the web page area and represent
+ // where on the screen the selection rect is currently located.
+ virtual void reportFindInPageSelection(
+ int identifier, int activeMatchOrdinal, const WebRect& selection) { }
+
+ // FileSystem ----------------------------------------------------
+
+ // Requests to open a FileSystem.
+ // |size| indicates how much storage space (in bytes) the caller expects
+ // to need.
+ // WebFileSystemCallbacks::didOpenFileSystem() must be called with
+ // a name and root path for the requested FileSystem when the operation
+ // is completed successfully. WebFileSystemCallbacks::didFail() must be
+ // called otherwise. The create bool is for indicating whether or not to
+ // create root path for file systems if it do not exist.
+ virtual void openFileSystem(
+ WebFrame*, WebFileSystem::Type, long long size,
+ bool create, WebFileSystemCallbacks*) { }
+
+ // FIXME: This method should be deleted once chromium implements the new method above.
+ virtual void openFileSystem(WebFrame* frame, WebFileSystem::Type type, long long size, WebFileSystemCallbacks* callbacks) { return openFileSystem(frame, type, size, true, callbacks); }
+
+protected:
+ ~WebFrameClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebGeolocationClient.h b/Source/WebKit/chromium/public/WebGeolocationClient.h
new file mode 100644
index 0000000..1dfb0cd
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGeolocationClient.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 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 WebGeolocationClient_h
+#define WebGeolocationClient_h
+
+namespace WebKit {
+class WebGeolocationController;
+class WebGeolocationPermissionRequest;
+class WebGeolocationPosition;
+
+class WebGeolocationClient {
+public:
+ virtual ~WebGeolocationClient() {}
+
+ virtual void startUpdating() = 0;
+ virtual void stopUpdating() = 0;
+ virtual void setEnableHighAccuracy(bool) = 0;
+ virtual void geolocationDestroyed() = 0;
+ virtual bool lastPosition(WebGeolocationPosition&) = 0;
+
+ virtual void requestPermission(const WebGeolocationPermissionRequest&) = 0;
+ virtual void cancelPermissionRequest(const WebGeolocationPermissionRequest&) = 0;
+
+ // The controller is valid until geolocationDestroyed() is invoked.
+ // Ownership of the WebGeolocationController is transferred to the client.
+ virtual void setController(WebGeolocationController*) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebGeolocationClient_h
diff --git a/Source/WebKit/chromium/public/WebGeolocationClientMock.h b/Source/WebKit/chromium/public/WebGeolocationClientMock.h
new file mode 100644
index 0000000..08a85e2
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGeolocationClientMock.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010, 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 WebGeolocationClientMock_h
+#define WebGeolocationClientMock_h
+
+#include "WebCommon.h"
+#include "WebGeolocationClient.h"
+#include "WebPrivateOwnPtr.h"
+
+namespace WebCore {
+class GeolocationClientMock;
+}
+
+namespace WebKit {
+class WebGeolocationPosition;
+class WebString;
+
+class WebGeolocationClientMock : public WebGeolocationClient {
+public:
+ WEBKIT_API static WebGeolocationClientMock* create();
+ ~WebGeolocationClientMock() { reset(); }
+
+ WEBKIT_API void setPosition(double latitude, double longitude, double accuracy);
+ WEBKIT_API void setError(int errorCode, const WebString& message);
+ WEBKIT_API void setPermission(bool);
+ WEBKIT_API void resetMock();
+
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual void setEnableHighAccuracy(bool);
+
+ virtual void geolocationDestroyed();
+ virtual void setController(WebGeolocationController*);
+
+ virtual void requestPermission(const WebGeolocationPermissionRequest&);
+ virtual void cancelPermissionRequest(const WebGeolocationPermissionRequest&);
+
+ virtual bool lastPosition(WebGeolocationPosition& webPosition);
+
+private:
+ WebGeolocationClientMock();
+ WEBKIT_API void reset();
+
+ WebPrivateOwnPtr<WebCore::GeolocationClientMock> m_clientMock;
+};
+}
+
+#endif // WebGeolocationClientMock_h
diff --git a/Source/WebKit/chromium/public/WebGeolocationController.h b/Source/WebKit/chromium/public/WebGeolocationController.h
new file mode 100644
index 0000000..3cddd0f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGeolocationController.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2010 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 WebGeolocationController_h
+#define WebGeolocationController_h
+
+#include "WebCommon.h"
+#include "WebNonCopyable.h"
+
+namespace WebCore { class GeolocationController; }
+
+namespace WebKit {
+
+class WebGeolocationPosition;
+class WebGeolocationError;
+
+// Note that the WebGeolocationController is invalid after the
+// WebGeolocationClient::geolocationDestroyed() has been received.
+class WebGeolocationController : public WebNonCopyable {
+public:
+ WEBKIT_API void positionChanged(const WebGeolocationPosition&);
+ WEBKIT_API void errorOccurred(const WebGeolocationError&);
+
+#if WEBKIT_IMPLEMENTATION
+ WebGeolocationController(WebCore::GeolocationController* c)
+ : m_private(c)
+ {
+ }
+
+ WebCore::GeolocationController* controller() const { return m_private; }
+#endif
+
+private:
+ // No implementation for the default constructor. Declared private to ensure that no instances
+ // can be created by the consumers of Chromium WebKit.
+ WebGeolocationController();
+
+ WebCore::GeolocationController* m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebGeolocationController_h
diff --git a/Source/WebKit/chromium/public/WebGeolocationError.h b/Source/WebKit/chromium/public/WebGeolocationError.h
new file mode 100644
index 0000000..ecb758c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGeolocationError.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 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 WebGeolocationError_h
+#define WebGeolocationError_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/PassRefPtr.h>
+#endif
+
+namespace WebCore { class GeolocationError; }
+
+namespace WebKit {
+
+class WebString;
+
+class WebGeolocationError {
+public:
+ enum Error {
+ ErrorPermissionDenied,
+ ErrorPositionUnavailable
+ };
+
+ WebGeolocationError(Error code, const WebString& message) { assign(code, message); }
+ WebGeolocationError(const WebGeolocationError& other) { assign(other); }
+ ~WebGeolocationError() { reset(); }
+
+ WEBKIT_API void assign(Error code, const WebString& message);
+ WEBKIT_API void assign(const WebGeolocationError&);
+ WEBKIT_API void reset();
+
+#if WEBKIT_IMPLEMENTATION
+ WebGeolocationError(WTF::PassRefPtr<WebCore::GeolocationError>);
+ WebGeolocationError& operator=(WTF::PassRefPtr<WebCore::GeolocationError>);
+ operator WTF::PassRefPtr<WebCore::GeolocationError>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::GeolocationError> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebGeolocationError_h
diff --git a/Source/WebKit/chromium/public/WebGeolocationPermissionRequest.h b/Source/WebKit/chromium/public/WebGeolocationPermissionRequest.h
new file mode 100644
index 0000000..8b2f69e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGeolocationPermissionRequest.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 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 WebGeolocationPermissionRequest_h
+#define WebGeolocationPermissionRequest_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+class Geolocation;
+}
+
+namespace WebKit {
+class WebSecurityOrigin;
+
+// WebGeolocationPermissionRequest encapsulates a WebCore Geolocation object and represents
+// a request from WebCore for permission to be determined for that Geolocation object.
+// The underlying Geolocation object is guaranteed to be valid until the invocation of
+// either WebGeolocationPermissionRequest::setIsAllowed (request complete) or
+// WebGeolocationClient::cancelPermissionRequest (request cancelled).
+class WebGeolocationPermissionRequest {
+public:
+ WEBKIT_API WebSecurityOrigin securityOrigin() const;
+ WEBKIT_API void setIsAllowed(bool);
+
+#if WEBKIT_IMPLEMENTATION
+ WebGeolocationPermissionRequest(WebCore::Geolocation* geolocation)
+ : m_private(geolocation)
+ {
+ }
+
+ WebCore::Geolocation* geolocation() const { return m_private; }
+#endif
+
+private:
+ WebCore::Geolocation* m_private;
+};
+}
+
+#endif // WebGeolocationPermissionRequest_h
diff --git a/Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h b/Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h
new file mode 100644
index 0000000..dfa1642
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 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 WebGeolocationPermissionRequestManager_h
+#define WebGeolocationPermissionRequestManager_h
+
+#include "WebNonCopyable.h"
+#include "WebPrivateOwnPtr.h"
+
+namespace WebKit {
+
+class WebGeolocationPermissionRequest;
+class WebGeolocationPermissionRequestManagerPrivate;
+
+// This class is used to map between integer identifiers and WebGeolocationPermissionRequest
+// instances. The intended usage is that on WebGeolocationClient::requestPermission(),
+// the implementer can call add() to associate an id with the WebGeolocationPermissionRequest object.
+// Once the permission request has been decided, the second remove() method can be used to
+// find the request. On WebGeolocationClient::cancelPermissionRequest, the first remove() method will
+// remove the association with the id.
+class WebGeolocationPermissionRequestManager : public WebNonCopyable {
+public:
+ WebGeolocationPermissionRequestManager() { init(); }
+ ~WebGeolocationPermissionRequestManager() { reset(); }
+
+ WEBKIT_API int add(const WebKit::WebGeolocationPermissionRequest&);
+ WEBKIT_API bool remove(const WebKit::WebGeolocationPermissionRequest&, int&);
+ WEBKIT_API bool remove(int, WebKit::WebGeolocationPermissionRequest&);
+
+private:
+ WEBKIT_API void init();
+ WEBKIT_API void reset();
+
+ WebPrivateOwnPtr<WebGeolocationPermissionRequestManagerPrivate> m_private;
+ int m_lastId;
+};
+
+}
+
+#endif // WebGeolocationPermissionRequestManager_h
+
diff --git a/Source/WebKit/chromium/public/WebGeolocationPosition.h b/Source/WebKit/chromium/public/WebGeolocationPosition.h
new file mode 100644
index 0000000..57ba314
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGeolocationPosition.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2010 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 WebGeolocationPosition_h
+#define WebGeolocationPosition_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/PassRefPtr.h>
+#endif
+
+namespace WebCore { class GeolocationPosition; }
+
+namespace WebKit {
+
+class WebGeolocationPosition {
+public:
+ WebGeolocationPosition() {}
+ WebGeolocationPosition(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
+ {
+ assign(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed);
+ }
+ WebGeolocationPosition(const WebGeolocationPosition& other) { assign(other); }
+ ~WebGeolocationPosition() { reset(); }
+
+ WEBKIT_API void assign(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed);
+ WEBKIT_API void assign(const WebGeolocationPosition&);
+ WEBKIT_API void reset();
+
+#if WEBKIT_IMPLEMENTATION
+ WebGeolocationPosition(WTF::PassRefPtr<WebCore::GeolocationPosition>);
+ WebGeolocationPosition& operator=(WTF::PassRefPtr<WebCore::GeolocationPosition>);
+ operator WTF::PassRefPtr<WebCore::GeolocationPosition>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::GeolocationPosition> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebGeolocationPosition_h
diff --git a/Source/WebKit/chromium/public/WebGlyphCache.h b/Source/WebKit/chromium/public/WebGlyphCache.h
new file mode 100644
index 0000000..661767d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGlyphCache.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 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 WebGlyphCache_h
+#define WebGlyphCache_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// An interface to query WebKit's glyph cache (which maps unicode characters to
+// glyphs in particular fonts).
+class WebGlyphCache {
+public:
+ // Returns the number of pages in the glyph cache.
+ WEBKIT_API static size_t pageCount();
+
+private:
+ WebGlyphCache(); // Not intended to be instanced.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebGraphicsContext3D.h b/Source/WebKit/chromium/public/WebGraphicsContext3D.h
new file mode 100644
index 0000000..6568d1c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebGraphicsContext3D.h
@@ -0,0 +1,331 @@
+/*
+ * Copyright (C) 2010 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 WebGraphicsContext3D_h
+#define WebGraphicsContext3D_h
+
+#include "WebCommon.h"
+#include "WebNonCopyable.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+// Typedef for server-side objects like OpenGL textures and program objects.
+typedef unsigned int WebGLId;
+
+class WebView;
+
+// This interface abstracts the operations performed by the
+// GraphicsContext3D in order to implement WebGL. Nearly all of the
+// methods exposed on this interface map directly to entry points in
+// the OpenGL ES 2.0 API.
+
+class WebGraphicsContext3D : public WebNonCopyable {
+public:
+ // Return value from getActiveUniform and getActiveAttrib.
+ struct ActiveInfo {
+ WebString name;
+ unsigned type;
+ int size;
+ };
+
+ // Context creation attributes.
+ struct Attributes {
+ Attributes()
+ : alpha(true)
+ , depth(true)
+ , stencil(true)
+ , antialias(true)
+ , premultipliedAlpha(true)
+ , canRecoverFromContextLoss(true)
+ {
+ }
+
+ bool alpha;
+ bool depth;
+ bool stencil;
+ bool antialias;
+ bool premultipliedAlpha;
+ bool canRecoverFromContextLoss;
+ };
+
+ // This destructor needs to be public so that using classes can destroy instances if initialization fails.
+ virtual ~WebGraphicsContext3D() {}
+
+ // Initializes the graphics context; should be the first operation performed
+ // on newly-constructed instances. Returns true on success.
+ virtual bool initialize(Attributes, WebView*, bool renderDirectlyToWebView) = 0;
+
+ // Makes the OpenGL context current on the current thread. Returns true on
+ // success.
+ virtual bool makeContextCurrent() = 0;
+
+ // The size of the region into which this WebGraphicsContext3D is rendering.
+ // Returns the last values passed to reshape().
+ virtual int width() = 0;
+ virtual int height() = 0;
+
+ // Helper to return the size in bytes of OpenGL data types
+ // like GL_FLOAT, GL_INT, etc.
+ virtual int sizeInBytes(int type) = 0;
+
+ // Resizes the region into which this WebGraphicsContext3D is drawing.
+ virtual void reshape(int width, int height) = 0;
+
+ // Query whether it is built on top of compliant GLES2 implementation.
+ virtual bool isGLES2Compliant() = 0;
+
+ // Helper for software compositing path. Reads back the frame buffer into
+ // the memory region pointed to by "pixels" with size "bufferSize". It is
+ // expected that the storage for "pixels" covers (4 * width * height) bytes.
+ // Returns true on success.
+ virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize) = 0;
+
+ // Returns the id of the texture which is used for storing the contents of
+ // the framebuffer associated with this context. This texture is accessible
+ // by the gpu-based page compositor.
+ virtual unsigned getPlatformTextureId() = 0;
+
+ // Copies the contents of the off-screen render target used by the WebGL
+ // context to the corresponding texture used by the compositor.
+ virtual void prepareTexture() = 0;
+
+ // Synthesizes an OpenGL error which will be returned from a
+ // later call to getError. This is used to emulate OpenGL ES
+ // 2.0 behavior on the desktop and to enforce additional error
+ // checking mandated by WebGL.
+ //
+ // Per the behavior of glGetError, this stores at most one
+ // instance of any given error, and returns them from calls to
+ // getError in the order they were added.
+ virtual void synthesizeGLError(unsigned long error) = 0;
+
+ // GL_CHROMIUM_map_sub
+ virtual void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access) = 0;
+ virtual void unmapBufferSubDataCHROMIUM(const void*) = 0;
+ virtual void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access) = 0;
+ virtual void unmapTexSubImage2DCHROMIUM(const void*) = 0;
+
+ // GL_CHROMIUM_copy_texture_to_parent_texture
+ virtual void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture) = 0;
+
+ // GL_CHROMIUM_request_extension
+ virtual WebString getRequestableExtensionsCHROMIUM() = 0;
+ virtual void requestExtensionCHROMIUM(const char*) = 0;
+
+ // The entry points below map directly to the OpenGL ES 2.0 API.
+ // See: http://www.khronos.org/registry/gles/
+ // and: http://www.khronos.org/opengles/sdk/docs/man/
+ virtual void activeTexture(unsigned long texture) = 0;
+ virtual void attachShader(WebGLId program, WebGLId shader) = 0;
+ virtual void bindAttribLocation(WebGLId program, unsigned long index, const char* name) = 0;
+ virtual void bindBuffer(unsigned long target, WebGLId buffer) = 0;
+ virtual void bindFramebuffer(unsigned long target, WebGLId framebuffer) = 0;
+ virtual void bindRenderbuffer(unsigned long target, WebGLId renderbuffer) = 0;
+ virtual void bindTexture(unsigned long target, WebGLId texture) = 0;
+ virtual void blendColor(double red, double green, double blue, double alpha) = 0;
+ virtual void blendEquation(unsigned long mode) = 0;
+ virtual void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha) = 0;
+ virtual void blendFunc(unsigned long sfactor, unsigned long dfactor) = 0;
+ virtual void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha) = 0;
+
+ virtual void bufferData(unsigned long target, int size, const void* data, unsigned long usage) = 0;
+ virtual void bufferSubData(unsigned long target, long offset, int size, const void* data) = 0;
+
+ virtual unsigned long checkFramebufferStatus(unsigned long target) = 0;
+ virtual void clear(unsigned long mask) = 0;
+ virtual void clearColor(double red, double green, double blue, double alpha) = 0;
+ virtual void clearDepth(double depth) = 0;
+ virtual void clearStencil(long s) = 0;
+ virtual void colorMask(bool red, bool green, bool blue, bool alpha) = 0;
+ virtual void compileShader(WebGLId shader) = 0;
+
+ virtual void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border) = 0;
+ virtual void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height) = 0;
+ virtual void cullFace(unsigned long mode) = 0;
+ virtual void depthFunc(unsigned long func) = 0;
+ virtual void depthMask(bool flag) = 0;
+ virtual void depthRange(double zNear, double zFar) = 0;
+ virtual void detachShader(WebGLId program, WebGLId shader) = 0;
+ virtual void disable(unsigned long cap) = 0;
+ virtual void disableVertexAttribArray(unsigned long index) = 0;
+ virtual void drawArrays(unsigned long mode, long first, long count) = 0;
+ virtual void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset) = 0;
+
+ virtual void enable(unsigned long cap) = 0;
+ virtual void enableVertexAttribArray(unsigned long index) = 0;
+ virtual void finish() = 0;
+ virtual void flush() = 0;
+ virtual void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, WebGLId renderbuffer) = 0;
+ virtual void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, WebGLId texture, long level) = 0;
+ virtual void frontFace(unsigned long mode) = 0;
+ virtual void generateMipmap(unsigned long target) = 0;
+
+ virtual bool getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo&) = 0;
+ virtual bool getActiveUniform(WebGLId program, unsigned long index, ActiveInfo&) = 0;
+
+ virtual void getAttachedShaders(WebGLId program, int maxCount, int* count, unsigned int* shaders) = 0;
+
+ virtual int getAttribLocation(WebGLId program, const char* name) = 0;
+
+ virtual void getBooleanv(unsigned long pname, unsigned char* value) = 0;
+
+ virtual void getBufferParameteriv(unsigned long target, unsigned long pname, int* value) = 0;
+
+ virtual Attributes getContextAttributes() = 0;
+
+ virtual unsigned long getError() = 0;
+
+ virtual bool isContextLost() = 0;
+
+ virtual void getFloatv(unsigned long pname, float* value) = 0;
+
+ virtual void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value) = 0;
+
+ virtual void getIntegerv(unsigned long pname, int* value) = 0;
+
+ virtual void getProgramiv(WebGLId program, unsigned long pname, int* value) = 0;
+
+ virtual WebString getProgramInfoLog(WebGLId program) = 0;
+
+ virtual void getRenderbufferParameteriv(unsigned long target, unsigned long pname, int* value) = 0;
+
+ virtual void getShaderiv(WebGLId shader, unsigned long pname, int* value) = 0;
+
+ virtual WebString getShaderInfoLog(WebGLId shader) = 0;
+
+ // TBD
+ // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+
+ virtual WebString getShaderSource(WebGLId shader) = 0;
+ virtual WebString getString(unsigned long name) = 0;
+
+ virtual void getTexParameterfv(unsigned long target, unsigned long pname, float* value) = 0;
+ virtual void getTexParameteriv(unsigned long target, unsigned long pname, int* value) = 0;
+
+ virtual void getUniformfv(WebGLId program, long location, float* value) = 0;
+ virtual void getUniformiv(WebGLId program, long location, int* value) = 0;
+
+ virtual long getUniformLocation(WebGLId program, const char* name) = 0;
+
+ virtual void getVertexAttribfv(unsigned long index, unsigned long pname, float* value) = 0;
+ virtual void getVertexAttribiv(unsigned long index, unsigned long pname, int* value) = 0;
+
+ virtual long getVertexAttribOffset(unsigned long index, unsigned long pname) = 0;
+
+ virtual void hint(unsigned long target, unsigned long mode) = 0;
+ virtual bool isBuffer(WebGLId buffer) = 0;
+ virtual bool isEnabled(unsigned long cap) = 0;
+ virtual bool isFramebuffer(WebGLId framebuffer) = 0;
+ virtual bool isProgram(WebGLId program) = 0;
+ virtual bool isRenderbuffer(WebGLId renderbuffer) = 0;
+ virtual bool isShader(WebGLId shader) = 0;
+ virtual bool isTexture(WebGLId texture) = 0;
+ virtual void lineWidth(double) = 0;
+ virtual void linkProgram(WebGLId program) = 0;
+ virtual void pixelStorei(unsigned long pname, long param) = 0;
+ virtual void polygonOffset(double factor, double units) = 0;
+
+ virtual void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels) = 0;
+
+ virtual void releaseShaderCompiler() = 0;
+ virtual void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height) = 0;
+ virtual void sampleCoverage(double value, bool invert) = 0;
+ virtual void scissor(long x, long y, unsigned long width, unsigned long height) = 0;
+ virtual void shaderSource(WebGLId shader, const char* string) = 0;
+ virtual void stencilFunc(unsigned long func, long ref, unsigned long mask) = 0;
+ virtual void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask) = 0;
+ virtual void stencilMask(unsigned long mask) = 0;
+ virtual void stencilMaskSeparate(unsigned long face, unsigned long mask) = 0;
+ virtual void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass) = 0;
+ virtual void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass) = 0;
+
+ virtual void texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels) = 0;
+
+ virtual void texParameterf(unsigned target, unsigned pname, float param) = 0;
+ virtual void texParameteri(unsigned target, unsigned pname, int param) = 0;
+
+ virtual void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, const void* pixels) = 0;
+
+ virtual void uniform1f(long location, float x) = 0;
+ virtual void uniform1fv(long location, int count, float* v) = 0;
+ virtual void uniform1i(long location, int x) = 0;
+ virtual void uniform1iv(long location, int count, int* v) = 0;
+ virtual void uniform2f(long location, float x, float y) = 0;
+ virtual void uniform2fv(long location, int count, float* v) = 0;
+ virtual void uniform2i(long location, int x, int y) = 0;
+ virtual void uniform2iv(long location, int count, int* v) = 0;
+ virtual void uniform3f(long location, float x, float y, float z) = 0;
+ virtual void uniform3fv(long location, int count, float* v) = 0;
+ virtual void uniform3i(long location, int x, int y, int z) = 0;
+ virtual void uniform3iv(long location, int count, int* v) = 0;
+ virtual void uniform4f(long location, float x, float y, float z, float w) = 0;
+ virtual void uniform4fv(long location, int count, float* v) = 0;
+ virtual void uniform4i(long location, int x, int y, int z, int w) = 0;
+ virtual void uniform4iv(long location, int count, int* v) = 0;
+ virtual void uniformMatrix2fv(long location, int count, bool transpose, const float* value) = 0;
+ virtual void uniformMatrix3fv(long location, int count, bool transpose, const float* value) = 0;
+ virtual void uniformMatrix4fv(long location, int count, bool transpose, const float* value) = 0;
+
+ virtual void useProgram(WebGLId program) = 0;
+ virtual void validateProgram(WebGLId program) = 0;
+
+ virtual void vertexAttrib1f(unsigned long indx, float x) = 0;
+ virtual void vertexAttrib1fv(unsigned long indx, const float* values) = 0;
+ virtual void vertexAttrib2f(unsigned long indx, float x, float y) = 0;
+ virtual void vertexAttrib2fv(unsigned long indx, const float* values) = 0;
+ virtual void vertexAttrib3f(unsigned long indx, float x, float y, float z) = 0;
+ virtual void vertexAttrib3fv(unsigned long indx, const float* values) = 0;
+ virtual void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w) = 0;
+ virtual void vertexAttrib4fv(unsigned long indx, const float* values) = 0;
+ virtual void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized,
+ unsigned long stride, unsigned long offset) = 0;
+
+ virtual void viewport(long x, long y, unsigned long width, unsigned long height) = 0;
+
+ // Support for buffer creation and deletion.
+ virtual unsigned createBuffer() = 0;
+ virtual unsigned createFramebuffer() = 0;
+ virtual unsigned createProgram() = 0;
+ virtual unsigned createRenderbuffer() = 0;
+ virtual unsigned createShader(unsigned long) = 0;
+ virtual unsigned createTexture() = 0;
+
+ virtual void deleteBuffer(unsigned) = 0;
+ virtual void deleteFramebuffer(unsigned) = 0;
+ virtual void deleteProgram(unsigned) = 0;
+ virtual void deleteRenderbuffer(unsigned) = 0;
+ virtual void deleteShader(unsigned) = 0;
+ virtual void deleteTexture(unsigned) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebHTTPBody.h b/Source/WebKit/chromium/public/WebHTTPBody.h
new file mode 100644
index 0000000..8c37622
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebHTTPBody.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2009 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 WebHTTPBody_h
+#define WebHTTPBody_h
+
+#include "WebData.h"
+#include "WebNonCopyable.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class FormData; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebHTTPBodyPrivate;
+
+class WebHTTPBody {
+public:
+ struct Element {
+ enum { TypeData, TypeFile, TypeBlob } type;
+ WebData data;
+ WebString filePath;
+ long long fileStart;
+ long long fileLength; // -1 means to the end of the file.
+ double modificationTime;
+ WebURL blobURL;
+ };
+
+ ~WebHTTPBody() { reset(); }
+
+ WebHTTPBody() : m_private(0) { }
+ WebHTTPBody(const WebHTTPBody& b) : m_private(0) { assign(b); }
+ WebHTTPBody& operator=(const WebHTTPBody& b)
+ {
+ assign(b);
+ return *this;
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebHTTPBody&);
+
+ bool isNull() const { return !m_private; }
+
+ // Returns the number of elements comprising the http body.
+ WEBKIT_API size_t elementCount() const;
+
+ // Sets the values of the element at the given index. Returns false if
+ // index is out of bounds.
+ WEBKIT_API bool elementAt(size_t index, Element&) const;
+
+ // Append to the list of elements.
+ WEBKIT_API void appendData(const WebData&);
+ WEBKIT_API void appendFile(const WebString&);
+ // Passing -1 to fileLength means to the end of the file.
+ WEBKIT_API void appendFileRange(const WebString&, long long fileStart, long long fileLength, double modificationTime);
+ WEBKIT_API void appendBlob(const WebURL&);
+
+ // Identifies a particular form submission instance. A value of 0 is
+ // used to indicate an unspecified identifier.
+ WEBKIT_API long long identifier() const;
+ WEBKIT_API void setIdentifier(long long);
+
+#if WEBKIT_IMPLEMENTATION
+ WebHTTPBody(const WTF::PassRefPtr<WebCore::FormData>&);
+ WebHTTPBody& operator=(const WTF::PassRefPtr<WebCore::FormData>&);
+ operator WTF::PassRefPtr<WebCore::FormData>() const;
+#endif
+
+private:
+ void assign(WebHTTPBodyPrivate*);
+ void ensureMutable();
+ WebHTTPBodyPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h b/Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h
new file mode 100644
index 0000000..2ca86c0
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 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 WebHTTPHeaderVisitor_h
+#define WebHTTPHeaderVisitor_h
+
+namespace WebKit {
+
+class WebString;
+
+class WebHTTPHeaderVisitor {
+public:
+ virtual void visitHeader(const WebString& name, const WebString& value) = 0;
+
+protected:
+ ~WebHTTPHeaderVisitor() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebHTTPLoadInfo.h b/Source/WebKit/chromium/public/WebHTTPLoadInfo.h
new file mode 100644
index 0000000..9ff9153
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebHTTPLoadInfo.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2010 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 WebHTTPLoadInfo_h
+#define WebHTTPLoadInfo_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+struct ResourceLoadInfo;
+}
+
+namespace WebKit {
+class WebString;
+
+class WebHTTPLoadInfo {
+public:
+ WebHTTPLoadInfo() { initialize(); }
+ ~WebHTTPLoadInfo() { reset(); }
+ WebHTTPLoadInfo(const WebHTTPLoadInfo& r) { assign(r); }
+ WebHTTPLoadInfo& operator =(const WebHTTPLoadInfo& r)
+ {
+ assign(r);
+ return *this;
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebHTTPLoadInfo& r);
+
+ WEBKIT_API int httpStatusCode() const;
+ WEBKIT_API void setHTTPStatusCode(int);
+
+ WEBKIT_API WebString httpStatusText() const;
+ WEBKIT_API void setHTTPStatusText(const WebString&);
+
+ WEBKIT_API void addRequestHeader(const WebString& name, const WebString& value);
+ WEBKIT_API void addResponseHeader(const WebString& name, const WebString& value);
+
+#if WEBKIT_IMPLEMENTATION
+ WebHTTPLoadInfo(WTF::PassRefPtr<WebCore::ResourceLoadInfo>);
+ operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::ResourceLoadInfo> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebHistoryItem.h b/Source/WebKit/chromium/public/WebHistoryItem.h
new file mode 100644
index 0000000..b5cd02b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebHistoryItem.h
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2009 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 WebHistoryItem_h
+#define WebHistoryItem_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class HistoryItem; }
+
+namespace WebKit {
+class WebHTTPBody;
+class WebString;
+class WebSerializedScriptValue;
+struct WebPoint;
+template <typename T> class WebVector;
+
+// Represents a frame-level navigation entry in session history. A
+// WebHistoryItem is a node in a tree.
+//
+// Copying a WebHistoryItem is cheap.
+//
+class WebHistoryItem {
+public:
+ ~WebHistoryItem() { reset(); }
+
+ WebHistoryItem() { }
+ WebHistoryItem(const WebHistoryItem& h) { assign(h); }
+ WebHistoryItem& operator=(const WebHistoryItem& h)
+ {
+ assign(h);
+ return *this;
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebHistoryItem&);
+
+ bool isNull() const { return m_private.isNull(); }
+
+ WEBKIT_API WebString urlString() const;
+ WEBKIT_API void setURLString(const WebString&);
+
+ WEBKIT_API WebString originalURLString() const;
+ WEBKIT_API void setOriginalURLString(const WebString&);
+
+ WEBKIT_API WebString referrer() const;
+ WEBKIT_API void setReferrer(const WebString&);
+
+ WEBKIT_API WebString target() const;
+ WEBKIT_API void setTarget(const WebString&);
+
+ WEBKIT_API WebString parent() const;
+ WEBKIT_API void setParent(const WebString&);
+
+ WEBKIT_API WebString title() const;
+ WEBKIT_API void setTitle(const WebString&);
+
+ WEBKIT_API WebString alternateTitle() const;
+ WEBKIT_API void setAlternateTitle(const WebString&);
+
+ WEBKIT_API double lastVisitedTime() const;
+ WEBKIT_API void setLastVisitedTime(double);
+
+ WEBKIT_API WebPoint scrollOffset() const;
+ WEBKIT_API void setScrollOffset(const WebPoint&);
+
+ WEBKIT_API bool isTargetItem() const;
+ WEBKIT_API void setIsTargetItem(bool);
+
+ WEBKIT_API int visitCount() const;
+ WEBKIT_API void setVisitCount(int);
+
+ WEBKIT_API WebVector<WebString> documentState() const;
+ WEBKIT_API void setDocumentState(const WebVector<WebString>&);
+
+ WEBKIT_API long long itemSequenceNumber() const;
+ WEBKIT_API void setItemSequenceNumber(long long);
+
+ WEBKIT_API long long documentSequenceNumber() const;
+ WEBKIT_API void setDocumentSequenceNumber(long long);
+
+ WEBKIT_API WebSerializedScriptValue stateObject() const;
+ WEBKIT_API void setStateObject(const WebSerializedScriptValue&);
+
+ WEBKIT_API WebString httpContentType() const;
+ WEBKIT_API void setHTTPContentType(const WebString&);
+
+ WEBKIT_API WebHTTPBody httpBody() const;
+ WEBKIT_API void setHTTPBody(const WebHTTPBody&);
+
+ WEBKIT_API WebVector<WebHistoryItem> children() const;
+ WEBKIT_API void setChildren(const WebVector<WebHistoryItem>&);
+ WEBKIT_API void appendToChildren(const WebHistoryItem&);
+
+#if WEBKIT_IMPLEMENTATION
+ WebHistoryItem(const WTF::PassRefPtr<WebCore::HistoryItem>&);
+ WebHistoryItem& operator=(const WTF::PassRefPtr<WebCore::HistoryItem>&);
+ operator WTF::PassRefPtr<WebCore::HistoryItem>() const;
+#endif
+
+private:
+ void ensureMutable();
+ WebPrivatePtr<WebCore::HistoryItem> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebIDBCallbacks.h b/Source/WebKit/chromium/public/WebIDBCallbacks.h
new file mode 100644
index 0000000..64ffc08
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBCallbacks.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 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 WebIDBCallbacks_h
+#define WebIDBCallbacks_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebIDBCursor;
+class WebIDBDatabase;
+class WebIDBDatabaseError;
+class WebIDBKey;
+class WebIDBIndex;
+class WebIDBObjectStore;
+class WebIDBTransaction;
+class WebSerializedScriptValue;
+
+class WebIDBCallbacks {
+public:
+ virtual ~WebIDBCallbacks() { }
+
+ // For classes that follow the PImpl pattern, pass a const reference.
+ // For the rest, pass ownership to the callee via a pointer.
+ virtual void onError(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); } // For "null".
+ virtual void onSuccess(WebIDBCursor*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(WebIDBIndex*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(WebIDBObjectStore*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(WebIDBTransaction*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); }
+};
+
+} // namespace WebKit
+
+#endif // WebIDBCallbacks_h
diff --git a/Source/WebKit/chromium/public/WebIDBCursor.h b/Source/WebKit/chromium/public/WebIDBCursor.h
new file mode 100644
index 0000000..98b2b97
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBCursor.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 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 WebIDBCursor_h
+#define WebIDBCursor_h
+
+#include "WebCommon.h"
+#include "WebExceptionCode.h"
+#include "WebIDBCallbacks.h"
+#include "WebIDBKey.h"
+#include "WebSerializedScriptValue.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+// See comment in WebIDBFactory for a high level overview these classes.
+class WebIDBCursor {
+public:
+ virtual ~WebIDBCursor() { }
+
+ virtual unsigned short direction() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual WebIDBKey key() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebIDBKey::createInvalid();
+ }
+ // One or the other will set, depending on what type of cursor this is.
+ virtual void value(WebSerializedScriptValue& serializedScriptValue, WebIDBKey& idbKey) const { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ // FIXME: Remove after WK roll.
+ virtual void remove(WebIDBCallbacks* callbacks, WebExceptionCode& ec) { deleteFunction(callbacks, ec); }
+ virtual void deleteFunction(WebIDBCallbacks* callbacks, WebExceptionCode& ec) { remove(callbacks, ec); }
+
+protected:
+ WebIDBCursor() { }
+};
+
+} // namespace WebKit
+
+#endif // WebIDBCursor_h
diff --git a/Source/WebKit/chromium/public/WebIDBDatabase.h b/Source/WebKit/chromium/public/WebIDBDatabase.h
new file mode 100644
index 0000000..5ed8052
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBDatabase.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2010 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 WebIDBDatabase_h
+#define WebIDBDatabase_h
+
+#include "WebCommon.h"
+#include "WebDOMStringList.h"
+#include "WebExceptionCode.h"
+
+namespace WebKit {
+
+class WebFrame;
+class WebIDBCallbacks;
+class WebIDBObjectStore;
+class WebIDBTransaction;
+
+// See comment in WebIDBFactory for a high level overview of these classes.
+class WebIDBDatabase {
+public:
+ virtual ~WebIDBDatabase() { }
+
+ virtual WebString name() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebString version() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebDOMStringList objectStoreNames() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebDOMStringList();
+ }
+ virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ // Transfers ownership of the WebIDBTransaction to the caller.
+ virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual void close() { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ WebIDBDatabase() { }
+};
+
+} // namespace WebKit
+
+#endif // WebIDBDatabase_h
diff --git a/Source/WebKit/chromium/public/WebIDBDatabaseError.h b/Source/WebKit/chromium/public/WebIDBDatabaseError.h
new file mode 100644
index 0000000..f247b36
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBDatabaseError.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 WebIDBDatabaseError_h
+#define WebIDBDatabaseError_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+#include "WebString.h"
+
+namespace WebCore { class IDBDatabaseError; }
+
+namespace WebKit {
+
+// See comment in WebIDBFactory for a high level overview these classes.
+class WebIDBDatabaseError {
+public:
+ ~WebIDBDatabaseError() { reset(); }
+
+ WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
+ WebIDBDatabaseError(const WebIDBDatabaseError& error) { assign(error); }
+ WebIDBDatabaseError& operator=(const WebIDBDatabaseError& error)
+ {
+ assign(error);
+ return *this;
+ }
+
+ WEBKIT_API void assign(const WebIDBDatabaseError&);
+ WEBKIT_API void reset();
+
+ WEBKIT_API unsigned short code() const;
+ WEBKIT_API WebString message() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebIDBDatabaseError(const WTF::PassRefPtr<WebCore::IDBDatabaseError>&);
+ WebIDBDatabaseError& operator=(const WTF::PassRefPtr<WebCore::IDBDatabaseError>&);
+ operator WTF::PassRefPtr<WebCore::IDBDatabaseError>() const;
+#endif
+
+private:
+ WEBKIT_API void assign(unsigned short code, const WebString& message);
+
+ WebPrivatePtr<WebCore::IDBDatabaseError> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebIDBDatabaseError_h
diff --git a/Source/WebKit/chromium/public/WebIDBFactory.h b/Source/WebKit/chromium/public/WebIDBFactory.h
new file mode 100755
index 0000000..10a134a
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBFactory.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 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 WebIDBFactory_h
+#define WebIDBFactory_h
+
+#include "WebCommon.h"
+#include "WebDOMStringList.h"
+#include "WebIDBCallbacks.h"
+#include "WebSecurityOrigin.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebFrame;
+class WebIDBDatabase;
+class WebSecurityOrigin;
+
+// The entry point into the IndexedDatabase API. These classes match their Foo and
+// FooSync counterparts in the spec, but operate only in an async manner.
+// http://dev.w3.org/2006/webapi/WebSimpleDB/
+class WebIDBFactory {
+public:
+ WEBKIT_API static WebIDBFactory* create();
+
+ virtual ~WebIDBFactory() { }
+
+ // The WebKit implementation of open ignores the WebFrame* parameter.
+ virtual void open(const WebString& name, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir, unsigned long long maximumSize)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+};
+
+} // namespace WebKit
+
+#endif // WebIDBFactory_h
diff --git a/Source/WebKit/chromium/public/WebIDBIndex.h b/Source/WebKit/chromium/public/WebIDBIndex.h
new file mode 100644
index 0000000..3c07a50
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBIndex.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 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 WebIDBIndex_h
+#define WebIDBIndex_h
+
+#include "WebExceptionCode.h"
+#include "WebIDBTransaction.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebIDBCallbacks;
+class WebIDBKey;
+class WebIDBKeyRange;
+
+// See comment in WebIDBFactory for a high level overview of these classes.
+class WebIDBIndex {
+public:
+ virtual ~WebIDBIndex() { }
+
+ virtual WebString name() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebString storeName() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebString keyPath() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual bool unique() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return false;
+ }
+
+ virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void getObject(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void getKey(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ WebIDBIndex() {}
+};
+
+} // namespace WebKit
+
+#endif // WebIDBIndex_h
diff --git a/Source/WebKit/chromium/public/WebIDBKey.h b/Source/WebKit/chromium/public/WebIDBKey.h
new file mode 100644
index 0000000..376d1c5
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBKey.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2010 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 WebIDBKey_h
+#define WebIDBKey_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+#include "WebString.h"
+
+namespace WebCore { class IDBKey; }
+
+namespace WebKit {
+
+class WebIDBKeyPath;
+class WebSerializedScriptValue;
+
+class WebIDBKey {
+public:
+ // Please use one of the factory methods. This is public only to allow WebVector.
+ WebIDBKey() { }
+ ~WebIDBKey() { reset(); }
+
+ WEBKIT_API static WebIDBKey createNull();
+ WEBKIT_API static WebIDBKey createString(const WebString&);
+ WEBKIT_API static WebIDBKey createDate(double);
+ WEBKIT_API static WebIDBKey createNumber(double);
+ WEBKIT_API static WebIDBKey createInvalid();
+ WEBKIT_API static WebIDBKey createFromValueAndKeyPath(const WebSerializedScriptValue&, const WebIDBKeyPath&);
+
+ WebIDBKey(const WebIDBKey& e) { assign(e); }
+ WebIDBKey& operator=(const WebIDBKey& e)
+ {
+ assign(e);
+ return *this;
+ }
+
+ WEBKIT_API void assign(const WebIDBKey&);
+ WEBKIT_API void assignNull();
+ WEBKIT_API void assignString(const WebString&);
+ WEBKIT_API void assignDate(double);
+ WEBKIT_API void assignNumber(double);
+ WEBKIT_API void assignInvalid();
+ WEBKIT_API void reset();
+
+ enum Type {
+ NullType = 0,
+ StringType,
+ DateType,
+ NumberType,
+ // Types not in WebCore::IDBKey:
+ InvalidType
+ };
+
+ WEBKIT_API Type type() const;
+ WEBKIT_API WebString string() const; // Only valid for StringType.
+ WEBKIT_API double date() const; // Only valid for DateType.
+ WEBKIT_API double number() const; // Only valid for NumberType.
+
+#if WEBKIT_IMPLEMENTATION
+ WebIDBKey(const WTF::PassRefPtr<WebCore::IDBKey>&);
+ WebIDBKey& operator=(const WTF::PassRefPtr<WebCore::IDBKey>&);
+ operator WTF::PassRefPtr<WebCore::IDBKey>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::IDBKey> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebIDBKey_h
diff --git a/Source/WebKit/chromium/public/WebIDBKeyPath.h b/Source/WebKit/chromium/public/WebIDBKeyPath.h
new file mode 100644
index 0000000..db6c363
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBKeyPath.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 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 WebIDBKeyPath_h
+#define WebIDBKeyPath_h
+
+#include "WebCommon.h"
+#include "WebPrivateOwnPtr.h"
+#include "WebVector.h"
+
+namespace WebCore { struct IDBKeyPathElement; }
+
+namespace WTF { template<typename T, size_t inlineCapacity> class Vector; }
+
+namespace WebKit {
+
+class WebString;
+
+class WebIDBKeyPath {
+public:
+ WEBKIT_API static WebIDBKeyPath create(const WebString&);
+ WebIDBKeyPath(const WebIDBKeyPath& keyPath) { assign(keyPath); }
+ ~WebIDBKeyPath() { reset(); }
+
+ WEBKIT_API int parseError() const;
+ WEBKIT_API void assign(const WebIDBKeyPath&);
+ WEBKIT_API void reset();
+
+#if WEBKIT_IMPLEMENTATION
+ operator const WTF::Vector<WebCore::IDBKeyPathElement, 0>& () const;
+#endif
+
+private:
+ WebIDBKeyPath();
+
+#if WEBKIT_IMPLEMENTATION
+ WebIDBKeyPath(const WTF::Vector<WebCore::IDBKeyPathElement, 0>&, int parseError);
+#endif
+
+ WebPrivateOwnPtr<WTF::Vector<WebCore::IDBKeyPathElement, 0> > m_private;
+ int m_parseError;
+};
+
+} // namespace WebKit
+
+#endif // WebIDBKeyPath_h
diff --git a/Source/WebKit/chromium/public/WebIDBKeyRange.h b/Source/WebKit/chromium/public/WebIDBKeyRange.h
new file mode 100644
index 0000000..922d4ed
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBKeyRange.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 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 WebIDBKeyRange_h
+#define WebIDBKeyRange_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class IDBKeyRange; }
+
+namespace WebKit {
+
+class WebIDBKey;
+class WebString;
+
+class WebIDBKeyRange {
+public:
+ ~WebIDBKeyRange() { reset(); }
+
+ WebIDBKeyRange(const WebIDBKeyRange& keyRange) { assign(keyRange); }
+ WebIDBKeyRange(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen) { assign(lower, upper, lowerOpen, upperOpen); }
+
+ WEBKIT_API WebIDBKey lower() const;
+ WEBKIT_API WebIDBKey upper() const;
+ WEBKIT_API bool lowerOpen() const;
+ WEBKIT_API bool upperOpen() const;
+
+ WEBKIT_API void assign(const WebIDBKeyRange&);
+ WEBKIT_API void assign(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen);
+ WEBKIT_API void reset();
+
+#if WEBKIT_IMPLEMENTATION
+ WebIDBKeyRange(const WTF::PassRefPtr<WebCore::IDBKeyRange>&);
+ WebIDBKeyRange& operator=(const WTF::PassRefPtr<WebCore::IDBKeyRange>&);
+ operator WTF::PassRefPtr<WebCore::IDBKeyRange>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::IDBKeyRange> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebIDBKeyRange_h
diff --git a/Source/WebKit/chromium/public/WebIDBObjectStore.h b/Source/WebKit/chromium/public/WebIDBObjectStore.h
new file mode 100755
index 0000000..8f2247f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBObjectStore.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2010 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 WebIDBObjectStore_h
+#define WebIDBObjectStore_h
+
+#include "WebCommon.h"
+#include "WebExceptionCode.h"
+#include "WebDOMStringList.h"
+#include "WebIDBCallbacks.h"
+#include "WebIDBTransaction.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebIDBKeyRange;
+class WebIDBTransaction;
+
+// See comment in WebIDBFactory for a high level overview these classes.
+class WebIDBObjectStore {
+public:
+ virtual ~WebIDBObjectStore() { }
+
+ virtual WebString name() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebString keyPath() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebDOMStringList indexNames() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebDOMStringList();
+ }
+
+ virtual void get(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void put(const WebSerializedScriptValue&, const WebIDBKey&, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void deleteFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ // Transfers ownership of the WebIDBIndex to the caller.
+ virtual WebIDBIndex* index(const WebString& name, WebExceptionCode&)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual void deleteIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ WebIDBObjectStore() {}
+};
+
+} // namespace WebKit
+
+#endif // WebIDBObjectStore_h
diff --git a/Source/WebKit/chromium/public/WebIDBTransaction.h b/Source/WebKit/chromium/public/WebIDBTransaction.h
new file mode 100644
index 0000000..74919a8
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBTransaction.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2010 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 WebIDBTransaction_h
+#define WebIDBTransaction_h
+
+#include "WebExceptionCode.h"
+#include "WebString.h"
+
+namespace WebCore { class IDBTransactionBackendInterface; }
+
+namespace WebKit {
+
+class WebIDBObjectStore;
+class WebIDBTransactionCallbacks;
+
+// See comment in WebIDBFactory for a high level overview of these classes.
+class WebIDBTransaction {
+public:
+ virtual ~WebIDBTransaction() { }
+
+ virtual int mode() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual WebIDBObjectStore* objectStore(const WebString& name, WebExceptionCode&)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual void abort() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void didCompleteTaskEvents() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void setCallbacks(WebIDBTransactionCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // FIXME: this is never called from WebCore. Find a cleaner solution.
+ virtual WebCore::IDBTransactionBackendInterface* getIDBTransactionBackendInterface() const
+ {
+ return 0;
+ }
+
+protected:
+ WebIDBTransaction() {}
+};
+
+} // namespace WebKit
+
+#endif // WebIDBTransaction_h
diff --git a/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h b/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h
new file mode 100644
index 0000000..c9b6b05
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2010 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 WebIDBTransactionCallbacks_h
+#define WebIDBTransactionCallbacks_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+class WebIDBTransactionCallbacks {
+public:
+ virtual ~WebIDBTransactionCallbacks() { }
+
+ virtual void onAbort() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onComplete() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onTimeout() { WEBKIT_ASSERT_NOT_REACHED(); }
+};
+
+} // namespace WebKit
+
+#endif // WebIDBTransactionCallbacks_h
diff --git a/Source/WebKit/chromium/public/WebImage.h b/Source/WebKit/chromium/public/WebImage.h
new file mode 100644
index 0000000..a7b6f8c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebImage.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2009 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 WebImage_h
+#define WebImage_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_USING_SKIA
+#include <SkBitmap.h>
+#elif WEBKIT_USING_CG
+typedef struct CGImage* CGImageRef;
+#endif
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Image; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebData;
+struct WebSize;
+
+// A container for an ARGB bitmap.
+class WebImage {
+public:
+ ~WebImage() { reset(); }
+
+ WebImage() { init(); }
+ WebImage(const WebImage& image)
+ {
+ init();
+ assign(image);
+ }
+
+ WebImage& operator=(const WebImage& image)
+ {
+ assign(image);
+ return *this;
+ }
+
+ // Decodes the given image data. If the image has multiple frames,
+ // then the frame whose size is desiredSize is returned. Otherwise,
+ // the first frame is returned.
+ WEBKIT_API static WebImage fromData(const WebData&, const WebSize& desiredSize);
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebImage&);
+
+ WEBKIT_API bool isNull() const;
+ WEBKIT_API WebSize size() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebImage(const WTF::PassRefPtr<WebCore::Image>&);
+ WebImage& operator=(const WTF::PassRefPtr<WebCore::Image>&);
+#endif
+
+#if WEBKIT_USING_SKIA
+ WebImage(const SkBitmap& bitmap) : m_bitmap(bitmap) { }
+
+ WebImage& operator=(const SkBitmap& bitmap)
+ {
+ m_bitmap = bitmap;
+ return *this;
+ }
+
+ SkBitmap& getSkBitmap() { return m_bitmap; }
+ const SkBitmap& getSkBitmap() const { return m_bitmap; }
+
+private:
+ void init() { }
+ SkBitmap m_bitmap;
+
+#elif WEBKIT_USING_CG
+ WebImage(CGImageRef imageRef)
+ {
+ init();
+ assign(imageRef);
+ }
+
+ WebImage& operator=(CGImageRef imageRef)
+ {
+ assign(imageRef);
+ return *this;
+ }
+
+ CGImageRef getCGImageRef() const { return m_imageRef; }
+
+private:
+ void init() { m_imageRef = 0; }
+ void assign(CGImageRef);
+ CGImageRef m_imageRef;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebImageDecoder.h b/Source/WebKit/chromium/public/WebImageDecoder.h
new file mode 100644
index 0000000..22db709
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebImageDecoder.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2010 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 WebImageDecoder_h
+#define WebImageDecoder_h
+
+#include "WebCommon.h"
+#include "WebImage.h"
+#include "WebNonCopyable.h"
+
+namespace WebCore { class ImageDecoder; }
+
+namespace WebKit {
+
+typedef WebCore::ImageDecoder WebImageDecoderPrivate;
+class WebData;
+
+class WebImageDecoder : public WebNonCopyable {
+public:
+ enum Type {
+ TypeBMP,
+ TypeICO
+ };
+
+ ~WebImageDecoder() { reset(); }
+
+ explicit WebImageDecoder(Type type) { init(type); }
+
+ // Sets data contents for underlying decoder. All the API methods
+ // require that setData() is called prior to their use.
+ WEBKIT_API void setData(const WebData& data, bool allDataReceived);
+
+ // Deletes owned decoder.
+ WEBKIT_API void reset();
+
+ // Returns true if image decoding failed.
+ WEBKIT_API bool isFailed() const;
+
+ // Returns true if size information is available for the decoder.
+ WEBKIT_API bool isSizeAvailable() const;
+
+ // Returns the size of the image.
+ WEBKIT_API WebSize size() const;
+
+ // Gives frame count for the image. For multiple frames, decoder scans the image data for the count.
+ WEBKIT_API size_t frameCount() const;
+
+ // Returns if the frame at given index is completely decoded.
+ WEBKIT_API bool isFrameCompleteAtIndex(int index) const;
+
+ // Creates and returns WebImage from buffer at the index.
+ WEBKIT_API WebImage getFrameAtIndex(int index) const;
+
+private:
+ // Creates type-specific decoder.
+ WEBKIT_API void init(Type type);
+
+ WebImageDecoderPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebInputElement.h b/Source/WebKit/chromium/public/WebInputElement.h
new file mode 100644
index 0000000..be8623c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebInputElement.h
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2009 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 WebInputElement_h
+#define WebInputElement_h
+
+#include "WebFormControlElement.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLInputElement; }
+#endif
+
+namespace WebKit {
+
+ // Provides readonly access to some properties of a DOM input element node.
+ class WebInputElement : public WebFormControlElement {
+ public:
+ WebInputElement() : WebFormControlElement() { }
+ WebInputElement(const WebInputElement& element) : WebFormControlElement(element) { }
+
+ WebInputElement& operator=(const WebInputElement& element)
+ {
+ WebFormControlElement::assign(element);
+ return *this;
+ }
+ void assign(const WebInputElement& element) { WebFormControlElement::assign(element); }
+
+ // This returns true for all of textfield-looking types such as text,
+ // password, search, email, url, and number.
+ WEBKIT_API bool isTextField() const;
+ // This returns true only for type=text.
+ WEBKIT_API bool isText() const;
+ WEBKIT_API bool isPasswordField() const;
+ WEBKIT_API bool isImageButton() const;
+ WEBKIT_API bool autoComplete() const;
+ WEBKIT_API bool isReadOnly() const;
+ WEBKIT_API bool isEnabledFormControl() const;
+ WEBKIT_API int maxLength() const;
+ WEBKIT_API bool isActivatedSubmit() const;
+ WEBKIT_API void setActivatedSubmit(bool);
+ WEBKIT_API int size() const;
+ WEBKIT_API void setValue(const WebString&, bool sendChangeEvent = false);
+ WEBKIT_API WebString value() const;
+ WEBKIT_API void setSuggestedValue(const WebString&);
+ WEBKIT_API WebString suggestedValue() const;
+ WEBKIT_API void setPlaceholder(const WebString&);
+ WEBKIT_API WebString placeholder() const;
+ WEBKIT_API bool isAutofilled() const;
+ WEBKIT_API void setAutofilled(bool);
+ WEBKIT_API void dispatchFormControlChangeEvent();
+ WEBKIT_API void setSelectionRange(int, int);
+ WEBKIT_API int selectionStart() const;
+ WEBKIT_API int selectionEnd() const;
+ WEBKIT_API bool isValidValue(const WebString&) const;
+
+ // Exposes the default value of the maxLength attribute.
+ WEBKIT_API static const int defaultMaxLength;
+
+#if WEBKIT_IMPLEMENTATION
+ WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
+ WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLInputElement>() const;
+#endif
+ };
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebInputEvent.h b/Source/WebKit/chromium/public/WebInputEvent.h
new file mode 100644
index 0000000..581e76c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebInputEvent.h
@@ -0,0 +1,312 @@
+/*
+ * Copyright (C) 2009 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 WebInputEvent_h
+#define WebInputEvent_h
+
+#include "WebCommon.h"
+#include "WebTouchPoint.h"
+
+#include <string.h>
+
+namespace WebKit {
+
+// The classes defined in this file are intended to be used with
+// WebWidget's handleInputEvent method. These event types are cross-
+// platform and correspond closely to WebCore's Platform*Event classes.
+//
+// WARNING! These classes must remain PODs (plain old data). They are
+// intended to be "serializable" by copying their raw bytes, so they must
+// not contain any non-bit-copyable member variables!
+
+// WebInputEvent --------------------------------------------------------------
+
+class WebInputEvent {
+public:
+ WebInputEvent(unsigned sizeParam = sizeof(WebInputEvent))
+ : size(sizeParam)
+ , type(Undefined)
+ , modifiers(0)
+ , timeStampSeconds(0.0) { }
+
+ // When we use an input method (or an input method editor), we receive
+ // two events for a keypress. The former event is a keydown, which
+ // provides a keycode, and the latter is a textinput, which provides
+ // a character processed by an input method. (The mapping from a
+ // keycode to a character code is not trivial for non-English
+ // keyboards.)
+ // To support input methods, Safari sends keydown events to WebKit for
+ // filtering. WebKit sends filtered keydown events back to Safari,
+ // which sends them to input methods.
+ // Unfortunately, it is hard to apply this design to Chrome because of
+ // our multiprocess architecture. An input method is running in a
+ // browser process. On the other hand, WebKit is running in a renderer
+ // process. So, this design results in increasing IPC messages.
+ // To support input methods without increasing IPC messages, Chrome
+ // handles keyboard events in a browser process and send asynchronous
+ // input events (to be translated to DOM events) to a renderer
+ // process.
+ // This design is mostly the same as the one of Windows and Mac Carbon.
+ // So, for what it's worth, our Linux and Mac front-ends emulate our
+ // Windows front-end. To emulate our Windows front-end, we can share
+ // our back-end code among Windows, Linux, and Mac.
+ // TODO(hbono): Issue 18064: remove the KeyDown type since it isn't
+ // used in Chrome any longer.
+
+ enum Type {
+ Undefined = -1,
+
+ // WebMouseEvent
+ MouseDown,
+ MouseUp,
+ MouseMove,
+ MouseEnter,
+ MouseLeave,
+ ContextMenu,
+
+ // WebMouseWheelEvent
+ MouseWheel,
+
+ // WebKeyboardEvent
+ RawKeyDown,
+ KeyDown,
+ KeyUp,
+ Char,
+
+ // WebTouchEvent
+ TouchStart,
+ TouchMove,
+ TouchEnd,
+ TouchCancel,
+ };
+
+ enum Modifiers {
+ // modifiers for all events:
+ ShiftKey = 1 << 0,
+ ControlKey = 1 << 1,
+ AltKey = 1 << 2,
+ MetaKey = 1 << 3,
+
+ // modifiers for keyboard events:
+ IsKeyPad = 1 << 4,
+ IsAutoRepeat = 1 << 5,
+
+ // modifiers for mouse events:
+ LeftButtonDown = 1 << 6,
+ MiddleButtonDown = 1 << 7,
+ RightButtonDown = 1 << 8,
+
+ // Toggle modifiers for all events. Danger: these are not reflected
+ // into WebCore, so round-tripping from WebInputEvent to a WebCore
+ // event and back will not preserve these flags.
+ CapsLockOn = 1 << 9,
+ NumLockOn = 1 << 10,
+ };
+
+ static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey;
+
+ unsigned size; // The size of this structure, for serialization.
+ Type type;
+ int modifiers;
+ double timeStampSeconds; // Seconds since epoch.
+
+ // Returns true if the WebInputEvent |type| is a mouse event.
+ static bool isMouseEventType(int type)
+ {
+ return type == MouseDown
+ || type == MouseUp
+ || type == MouseMove
+ || type == MouseEnter
+ || type == MouseLeave
+ || type == ContextMenu;
+ }
+
+ // Returns true if the WebInputEvent |type| is a keyboard event.
+ static bool isKeyboardEventType(int type)
+ {
+ return type == RawKeyDown
+ || type == KeyDown
+ || type == KeyUp
+ || type == Char;
+ }
+
+ // Returns true if the WebInputEvent |type| is a touch event.
+ static bool isTouchEventType(int type)
+ {
+ return type == TouchStart
+ || type == TouchMove
+ || type == TouchEnd
+ || type == TouchCancel;
+ }
+};
+
+// WebKeyboardEvent -----------------------------------------------------------
+
+class WebKeyboardEvent : public WebInputEvent {
+public:
+ // Caps on string lengths so we can make them static arrays and keep
+ // them PODs.
+ static const size_t textLengthCap = 4;
+
+ // http://www.w3.org/TR/DOM-Level-3-Events/keyset.html lists the
+ // identifiers. The longest is 18 characters, so we round up to the
+ // next multiple of 4.
+ static const size_t keyIdentifierLengthCap = 20;
+
+ // |windowsKeyCode| is the Windows key code associated with this key
+ // event. Sometimes it's direct from the event (i.e. on Windows),
+ // sometimes it's via a mapping function. If you want a list, see
+ // WebCore/platform/chromium/KeyboardCodes* .
+ int windowsKeyCode;
+
+ // The actual key code genenerated by the platform. The DOM spec runs
+ // on Windows-equivalent codes (thus |windowsKeyCode| above) but it
+ // doesn't hurt to have this one around.
+ int nativeKeyCode;
+
+ // |text| is the text generated by this keystroke. |unmodifiedText| is
+ // |text|, but unmodified by an concurrently-held modifiers (except
+ // shift). This is useful for working out shortcut keys. Linux and
+ // Windows guarantee one character per event. The Mac does not, but in
+ // reality that's all it ever gives. We're generous, and cap it a bit
+ // longer.
+ WebUChar text[textLengthCap];
+ WebUChar unmodifiedText[textLengthCap];
+
+ // This is a string identifying the key pressed.
+ char keyIdentifier[keyIdentifierLengthCap];
+
+ // This identifies whether this event was tagged by the system as being
+ // a "system key" event (see
+ // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for
+ // details). Other platforms don't have this concept, but it's just
+ // easier to leave it always false than ifdef.
+ // int is used instead of bool to ensure the size of this structure is
+ // strictly aligned to a factor of 4 bytes, otherwise memory check tools
+ // like valgrind may complain about uninitialized memory usage when
+ // transfering it over the wire.
+ int isSystemKey;
+
+ WebKeyboardEvent(unsigned sizeParam = sizeof(WebKeyboardEvent))
+ : WebInputEvent(sizeParam)
+ , windowsKeyCode(0)
+ , nativeKeyCode(0)
+ , isSystemKey(false)
+ {
+ memset(&text, 0, sizeof(text));
+ memset(&unmodifiedText, 0, sizeof(unmodifiedText));
+ memset(&keyIdentifier, 0, sizeof(keyIdentifier));
+ }
+
+ // Sets keyIdentifier based on the value of windowsKeyCode. This is
+ // handy for generating synthetic keyboard events.
+ WEBKIT_API void setKeyIdentifierFromWindowsKeyCode();
+};
+
+// WebMouseEvent --------------------------------------------------------------
+
+class WebMouseEvent : public WebInputEvent {
+public:
+ // These values defined for WebCore::MouseButton
+ enum Button {
+ ButtonNone = -1,
+ ButtonLeft,
+ ButtonMiddle,
+ ButtonRight
+ };
+
+ Button button;
+ int x;
+ int y;
+ int windowX;
+ int windowY;
+ int globalX;
+ int globalY;
+ int clickCount;
+
+ WebMouseEvent(unsigned sizeParam = sizeof(WebMouseEvent))
+ : WebInputEvent(sizeParam)
+ , button(ButtonNone)
+ , x(0)
+ , y(0)
+ , windowX(0)
+ , windowY(0)
+ , globalX(0)
+ , globalY(0)
+ , clickCount(0)
+ {
+ }
+};
+
+// WebMouseWheelEvent ---------------------------------------------------------
+
+class WebMouseWheelEvent : public WebMouseEvent {
+public:
+ float deltaX;
+ float deltaY;
+ float wheelTicksX;
+ float wheelTicksY;
+
+ // int is used instead of bool to ensure the size of this structure is
+ // strictly aligned to a factor of 4 bytes, otherwise memory check tools
+ // like valgrind may complain about uninitialized memory usage when
+ // transfering it over the wire.
+ int scrollByPage;
+
+ WebMouseWheelEvent(unsigned sizeParam = sizeof(WebMouseWheelEvent))
+ : WebMouseEvent(sizeParam)
+ , deltaX(0.0f)
+ , deltaY(0.0f)
+ , wheelTicksX(0.0f)
+ , wheelTicksY(0.0f)
+ , scrollByPage(false)
+ {
+ }
+};
+
+// WebTouchEvent --------------------------------------------------------------
+
+class WebTouchEvent : public WebInputEvent {
+public:
+ static const int touchPointsLengthCap = 4;
+
+ int touchPointsLength;
+ WebTouchPoint touchPoints[touchPointsLengthCap];
+
+ WebTouchEvent(unsigned sizeParam = sizeof(WebTouchEvent))
+ : WebInputEvent(sizeParam)
+ , touchPointsLength(0)
+ {
+ }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebKit.h b/Source/WebKit/chromium/public/WebKit.h
new file mode 100644
index 0000000..732cac6
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebKit.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2009 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 WebKit_h
+#define WebKit_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebKitClient;
+
+// Must be called on the thread that will be the main WebKit thread before
+// using any other WebKit APIs. The provided WebKitClient must be non-null
+// and must remain valid until the current thread calls shutdown.
+WEBKIT_API void initialize(WebKitClient*);
+
+// Once shutdown, the WebKitClient passed to initialize will no longer be
+// accessed. No other WebKit objects should be in use when this function
+// is called. Any background threads created by WebKit are promised to be
+// terminated by the time this function returns.
+WEBKIT_API void shutdown();
+
+// Returns the WebKitClient instance passed to initialize.
+WEBKIT_API WebKitClient* webKitClient();
+
+// Alters the rendering of content to conform to a fixed set of rules.
+WEBKIT_API void setLayoutTestMode(bool);
+WEBKIT_API bool layoutTestMode();
+
+// Enables the named log channel. See WebCore/platform/Logging.h for details.
+WEBKIT_API void enableLogChannel(const char*);
+
+// Purge the plugin list cache. If |reloadPages| is true, any pages
+// containing plugins will be reloaded after refreshing the plugin list.
+WEBKIT_API void resetPluginCache(bool reloadPages);
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebKitClient.h b/Source/WebKit/chromium/public/WebKitClient.h
new file mode 100644
index 0000000..ae7892d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebKitClient.h
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2010 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 WebKitClient_h
+#define WebKitClient_h
+
+#include "WebAudioBus.h"
+#include "WebAudioDevice.h"
+#include "WebCommon.h"
+#include "WebData.h"
+#include "WebLocalizedString.h"
+#include "WebString.h"
+#include "WebVector.h"
+#include "WebURL.h"
+
+#include <time.h>
+
+#ifdef WIN32
+typedef void *HANDLE;
+#endif
+
+namespace WebKit {
+
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
+class WebBlobRegistry;
+class WebClipboard;
+class WebCookieJar;
+class WebFileSystem;
+class WebFileUtilities;
+class WebGraphicsContext3D;
+class WebIDBFactory;
+class WebIDBKey;
+class WebMessagePortChannel;
+class WebMimeRegistry;
+class WebPluginListBuilder;
+class WebSandboxSupport;
+class WebSerializedScriptValue;
+class WebSharedWorkerRepository;
+class WebSocketStreamHandle;
+class WebStorageNamespace;
+class WebThemeEngine;
+class WebURLLoader;
+
+class WebKitClient {
+public:
+ // Must return non-null.
+ virtual WebClipboard* clipboard() { return 0; }
+
+ // Must return non-null.
+ virtual WebMimeRegistry* mimeRegistry() { return 0; }
+
+ // Must return non-null.
+ virtual WebFileUtilities* fileUtilities() { return 0; }
+
+ // May return null if sandbox support is not necessary
+ virtual WebSandboxSupport* sandboxSupport() { return 0; }
+
+ // May return null on some platforms.
+ virtual WebThemeEngine* themeEngine() { return 0; }
+
+ // May return null.
+ virtual WebCookieJar* cookieJar() { return 0; }
+
+ // Blob ----------------------------------------------------------------
+
+ // Must return non-null.
+ virtual WebBlobRegistry* blobRegistry() { return 0; }
+
+ // DOM Storage --------------------------------------------------
+
+ // Return a LocalStorage namespace that corresponds to the following path.
+ virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
+
+ // Called when storage events fire.
+ virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
+ const WebString& newValue, const WebString& origin,
+ const WebURL& url, bool isLocalStorage) { }
+
+
+ // History -------------------------------------------------------------
+
+ // Returns the hash for the given canonicalized URL for use in visited
+ // link coloring.
+ virtual unsigned long long visitedLinkHash(
+ const char* canonicalURL, size_t length) { return 0; }
+
+ // Returns whether the given link hash is in the user's history. The
+ // hash must have been generated by calling VisitedLinkHash().
+ virtual bool isLinkVisited(unsigned long long linkHash) { return false; }
+
+
+ // HTML5 Database ------------------------------------------------------
+
+#ifdef WIN32
+ typedef HANDLE FileHandle;
+#else
+ typedef int FileHandle;
+#endif
+
+ // Opens a database file; dirHandle should be 0 if the caller does not need
+ // a handle to the directory containing this file
+ virtual FileHandle databaseOpenFile(
+ const WebString& vfsFileName, int desiredFlags) { return FileHandle(); }
+
+ // Deletes a database file and returns the error code
+ virtual int databaseDeleteFile(const WebString& vfsFileName, bool syncDir) { return 0; }
+
+ // Returns the attributes of the given database file
+ virtual long databaseGetFileAttributes(const WebString& vfsFileName) { return 0; }
+
+ // Returns the size of the given database file
+ virtual long long databaseGetFileSize(const WebString& vfsFileName) { return 0; }
+
+
+ // Indexed Database ----------------------------------------------------
+
+ virtual WebIDBFactory* idbFactory() { return 0; }
+ virtual void idbShutdown() { };
+ virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebString& keyPath, WebVector<WebIDBKey>& keys) { }
+
+
+ // Keygen --------------------------------------------------------------
+
+ // Handle the <keygen> tag for generating client certificates
+ // Returns a base64 encoded signed copy of a public key from a newly
+ // generated key pair and the supplied challenge string. keySizeindex
+ // specifies the strength of the key.
+ virtual WebString signedPublicKeyAndChallengeString(unsigned keySizeIndex,
+ const WebKit::WebString& challenge,
+ const WebKit::WebURL& url) { return WebString(); }
+
+
+
+ // Memory --------------------------------------------------------------
+
+ // Returns the current space allocated for the pagefile, in MB.
+ // That is committed size for Windows and virtual memory size for POSIX
+ virtual size_t memoryUsageMB() { return 0; }
+
+ // Same as above, but always returns actual value, without any caches.
+ virtual size_t actualMemoryUsageMB() { return 0; }
+
+
+ // Message Ports -------------------------------------------------------
+
+ // Creates a Message Port Channel. This can be called on any thread.
+ // The returned object should only be used on the thread it was created on.
+ virtual WebMessagePortChannel* createMessagePortChannel() { return 0; }
+
+
+ // Network -------------------------------------------------------------
+
+ // A suggestion to prefetch IP information for the given hostname.
+ virtual void prefetchHostName(const WebString&) { }
+
+ // Returns a new WebURLLoader instance.
+ virtual WebURLLoader* createURLLoader() { return 0; }
+
+ // Returns a new WebSocketStreamHandle instance.
+ virtual WebSocketStreamHandle* createSocketStreamHandle() { return 0; }
+
+ // Returns the User-Agent string that should be used for the given URL.
+ virtual WebString userAgent(const WebURL&) { return WebString(); }
+
+ // A suggestion to cache this metadata in association with this URL.
+ virtual void cacheMetadata(const WebURL&, double responseTime, const char* data, size_t dataSize) { }
+
+
+ // Plugins -------------------------------------------------------------
+
+ // If refresh is true, then cached information should not be used to
+ // satisfy this call.
+ virtual void getPluginList(bool refresh, WebPluginListBuilder*) { }
+
+
+ // Profiling -----------------------------------------------------------
+
+ virtual void decrementStatsCounter(const char* name) { }
+ virtual void incrementStatsCounter(const char* name) { }
+
+ // An event is identified by the pair (name, id). The extra parameter
+ // specifies additional data to log with the event.
+ virtual void traceEventBegin(const char* name, void* id, const char* extra) { }
+ virtual void traceEventEnd(const char* name, void* id, const char* extra) { }
+
+ // Callbacks for reporting histogram data.
+ // CustomCounts histogram has exponential bucket sizes, so that min=1, max=1000000, bucketCount=50 would do.
+ virtual void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount) { }
+ // Enumeration histogram buckets are linear, boundaryValue should be larger than any possible sample value.
+ virtual void histogramEnumeration(const char* name, int sample, int boundaryValue) { }
+
+
+ // Resources -----------------------------------------------------------
+
+ // Returns a blob of data corresponding to the named resource.
+ virtual WebData loadResource(const char* name) { return WebData(); }
+
+ // Decodes the in-memory audio file data and returns the linear PCM audio data in the destinationBus.
+ // A sample-rate conversion to sampleRate will occur if the file data is at a different sample-rate.
+ // Returns true on success.
+ virtual bool loadAudioResource(WebAudioBus* destinationBus, const char* audioFileData, size_t dataSize, double sampleRate) { return false; }
+
+ // Returns a localized string resource (with substitution parameters).
+ virtual WebString queryLocalizedString(WebLocalizedString::Name) { return WebString(); }
+ virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter) { return WebString(); }
+ virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter1, const WebString& parameter2) { return WebString(); }
+
+
+ // Sandbox ------------------------------------------------------------
+
+ // In some browsers, a "sandbox" restricts what operations a program
+ // is allowed to preform. Such operations are typically abstracted out
+ // via this API, but sometimes (like in HTML 5 database opening) WebKit
+ // needs to behave differently based on whether it's restricted or not.
+ // In these cases (and these cases only) you can call this function.
+ // It's OK for this value to be conservitive (i.e. true even if the
+ // sandbox isn't active).
+ virtual bool sandboxEnabled() { return false; }
+
+
+ // Shared Workers ------------------------------------------------------
+
+ virtual WebSharedWorkerRepository* sharedWorkerRepository() { return 0; }
+
+ // Sudden Termination --------------------------------------------------
+
+ // Disable/Enable sudden termination.
+ virtual void suddenTerminationChanged(bool enabled) { }
+
+
+ // System --------------------------------------------------------------
+
+ // Returns a value such as "en-US".
+ virtual WebString defaultLocale() { return WebString(); }
+
+ // Wall clock time in seconds since the epoch.
+ virtual double currentTime() { return 0; }
+
+ // Delayed work is driven by a shared timer.
+ virtual void setSharedTimerFiredFunction(void (*func)()) { }
+ virtual void setSharedTimerFireTime(double fireTime) { }
+ virtual void stopSharedTimer() { }
+
+ // Callable from a background WebKit thread.
+ virtual void callOnMainThread(void (*func)(void*), void* context) { }
+
+ // WebGL --------------------------------------------------------------
+
+ // May return null if WebGL is not supported.
+ // Returns newly allocated WebGraphicsContext3D instance.
+ virtual WebGraphicsContext3D* createGraphicsContext3D() { return 0; }
+
+ // Audio --------------------------------------------------------------
+
+ virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned numberOfChannels, double sampleRate, WebAudioDevice::RenderCallback*) { return 0; }
+
+ // FileSystem ----------------------------------------------------------
+
+ // Must return non-null.
+ virtual WebFileSystem* fileSystem() { return 0; }
+
+protected:
+ ~WebKitClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebLabelElement.h b/Source/WebKit/chromium/public/WebLabelElement.h
new file mode 100644
index 0000000..eb9b06d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebLabelElement.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 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 WebLabelElement_h
+#define WebLabelElement_h
+
+#include "WebElement.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLLabelElement; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+// Provides readonly access to some properties of a DOM label element node.
+class WebLabelElement : public WebElement {
+public:
+ WebLabelElement() : WebElement() { }
+ WebLabelElement(const WebLabelElement& element) : WebElement(element) { }
+
+ WebLabelElement& operator=(const WebLabelElement& element)
+ {
+ WebElement::assign(element);
+ return *this;
+ }
+
+ void assign(const WebLabelElement& element) { WebElement::assign(element); }
+
+ WEBKIT_API WebElement correspondingControl();
+
+#if WEBKIT_IMPLEMENTATION
+ WebLabelElement(const WTF::PassRefPtr<WebCore::HTMLLabelElement>&);
+ WebLabelElement& operator=(const WTF::PassRefPtr<WebCore::HTMLLabelElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLLabelElement>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebLocalizedString.h b/Source/WebKit/chromium/public/WebLocalizedString.h
new file mode 100644
index 0000000..598e972
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebLocalizedString.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2009 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 WebLocalizedString_h
+#define WebLocalizedString_h
+
+namespace WebKit {
+
+struct WebLocalizedString {
+ enum Name {
+ SubmitButtonDefaultLabel,
+ InputElementAltText,
+ ResetButtonDefaultLabel,
+ FileButtonChooseFileLabel,
+ FileButtonNoFileSelectedLabel,
+ MultipleFileUploadText,
+ SearchableIndexIntroduction,
+ SearchMenuNoRecentSearchesText,
+ SearchMenuRecentSearchesText,
+ SearchMenuClearRecentSearchesText,
+ AXWebAreaText,
+ AXLinkText,
+ AXListMarkerText,
+ AXImageMapText,
+ AXHeadingText,
+ AXButtonActionVerb,
+ AXRadioButtonActionVerb,
+ AXTextFieldActionVerb,
+ AXCheckedCheckBoxActionVerb,
+ AXUncheckedCheckBoxActionVerb,
+ AXLinkActionVerb,
+ KeygenMenuHighGradeKeySize,
+ KeygenMenuMediumGradeKeySize,
+ ValidationValueMissing,
+ ValidationValueMissingForCheckbox,
+ ValidationValueMissingForFile,
+ ValidationValueMissingForMultipleFile,
+ ValidationValueMissingForRadio,
+ ValidationValueMissingForSelect,
+ ValidationTypeMismatch,
+ ValidationTypeMismatchForEmail,
+ ValidationTypeMismatchForMultipleEmail,
+ ValidationTypeMismatchForURL,
+ ValidationPatternMismatch,
+ ValidationTooLong,
+ ValidationRangeUnderflow,
+ ValidationRangeOverflow,
+ ValidationStepMismatch,
+ };
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebMediaElement.h b/Source/WebKit/chromium/public/WebMediaElement.h
new file mode 100644
index 0000000..94837a5
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebMediaElement.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 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 WebMediaElement_h
+#define WebMediaElement_h
+
+#include "WebElement.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLMediaElement; }
+#endif
+
+namespace WebKit {
+
+class WebMediaPlayer;
+
+class WebMediaElement : public WebElement {
+public:
+ WEBKIT_API WebMediaPlayer* player() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebMediaElement(const WTF::PassRefPtr<WebCore::HTMLMediaElement>&);
+ WebMediaElement& operator=(const WTF::PassRefPtr<WebCore::HTMLMediaElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLMediaElement>() const;
+#endif
+};
+} // namespace WebKit
+
+#endif // WebMediaElement_h
diff --git a/Source/WebKit/chromium/public/WebMediaPlayer.h b/Source/WebKit/chromium/public/WebMediaPlayer.h
new file mode 100644
index 0000000..6cec0f5
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebMediaPlayer.h
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2009 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 WebMediaPlayer_h
+#define WebMediaPlayer_h
+
+#include "WebCanvas.h"
+#include "WebVector.h"
+#include "WebVideoFrame.h"
+
+namespace WebKit {
+
+class WebMediaPlayerClient;
+class WebURL;
+struct WebRect;
+struct WebSize;
+
+struct WebTimeRange {
+ WebTimeRange() : start(0), end(0) {}
+ WebTimeRange(float s, float e) : start(s), end(e) {}
+
+ float start;
+ float end;
+};
+
+typedef WebVector<WebTimeRange> WebTimeRanges;
+
+class WebMediaPlayer {
+public:
+ enum NetworkState {
+ Empty,
+ Idle,
+ Loading,
+ Loaded,
+ FormatError,
+ NetworkError,
+ DecodeError,
+ };
+
+ enum ReadyState {
+ HaveNothing,
+ HaveMetadata,
+ HaveCurrentData,
+ HaveFutureData,
+ HaveEnoughData,
+ };
+
+ enum MovieLoadType {
+ Unknown,
+ Download,
+ StoredStream,
+ LiveStream,
+ };
+
+ virtual ~WebMediaPlayer() {}
+
+ virtual void load(const WebURL&) = 0;
+ virtual void cancelLoad() = 0;
+
+ // Playback controls.
+ virtual void play() = 0;
+ virtual void pause() = 0;
+ virtual bool supportsFullscreen() const = 0;
+ virtual bool supportsSave() const = 0;
+ virtual void seek(float seconds) = 0;
+ virtual void setEndTime(float seconds) = 0;
+ virtual void setRate(float) = 0;
+ virtual void setVolume(float) = 0;
+ virtual void setVisible(bool) = 0;
+ virtual bool setAutoBuffer(bool) = 0;
+ virtual bool totalBytesKnown() = 0;
+ virtual const WebTimeRanges& buffered() = 0;
+ virtual float maxTimeSeekable() const = 0;
+
+ virtual void setSize(const WebSize&) = 0;
+
+ virtual void paint(WebCanvas*, const WebRect&) = 0;
+
+ // True if the loaded media has a playable video/audio track.
+ virtual bool hasVideo() const = 0;
+ virtual bool hasAudio() const = 0;
+
+ // Dimension of the video.
+ virtual WebSize naturalSize() const = 0;
+
+ // Getters of playback state.
+ virtual bool paused() const = 0;
+ virtual bool seeking() const = 0;
+ virtual float duration() const = 0;
+ virtual float currentTime() const = 0;
+
+ // Get rate of loading the resource.
+ virtual int dataRate() const = 0;
+
+ // Internal states of loading and network.
+ virtual NetworkState networkState() const = 0;
+ virtual ReadyState readyState() const = 0;
+
+ virtual unsigned long long bytesLoaded() const = 0;
+ virtual unsigned long long totalBytes() const = 0;
+
+ virtual bool hasSingleSecurityOrigin() const = 0;
+ virtual MovieLoadType movieLoadType() const = 0;
+
+ // This function returns a pointer to a WebVideoFrame, which is
+ // a WebKit wrapper for a video frame in chromium. This places a lock
+ // on the frame in chromium, and calls to this method should always be
+ // followed with a call to putCurrentFrame(). The ownership of this object
+ // is not transferred to the caller, and the caller should not free the
+ // returned object.
+ virtual WebVideoFrame* getCurrentFrame() { return 0; }
+ // This function releases the lock on the current video frame in Chromium.
+ // It should always be called after getCurrentFrame(). Frame passed to this
+ // method should no longer be referenced after the call is made.
+ virtual void putCurrentFrame(WebVideoFrame*) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebMediaPlayerAction.h b/Source/WebKit/chromium/public/WebMediaPlayerAction.h
new file mode 100644
index 0000000..192704f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebMediaPlayerAction.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 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 WebMediaPlayerAction_h
+#define WebMediaPlayerAction_h
+
+namespace WebKit {
+
+struct WebMediaPlayerAction {
+ enum Type {
+ Unknown,
+ Play,
+ Mute,
+ Loop,
+ Controls
+ };
+
+ Type type;
+ bool enable;
+
+ WebMediaPlayerAction()
+ : type(Unknown), enable(false) { }
+ WebMediaPlayerAction(Type type, bool enable)
+ : type(type), enable(enable) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebMediaPlayerClient.h b/Source/WebKit/chromium/public/WebMediaPlayerClient.h
new file mode 100644
index 0000000..7e5dd68
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebMediaPlayerClient.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 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 WebMediaPlayerClient_h
+#define WebMediaPlayerClient_h
+
+namespace WebKit {
+
+class WebRequest;
+class WebURL;
+
+class WebMediaPlayerClient {
+public:
+ virtual void networkStateChanged() = 0;
+ virtual void readyStateChanged() = 0;
+ virtual void volumeChanged(float) = 0;
+ virtual void muteChanged(bool) = 0;
+ virtual void timeChanged() = 0;
+ virtual void repaint() = 0;
+ virtual void durationChanged() = 0;
+ virtual void rateChanged() = 0;
+ virtual void sizeChanged() = 0;
+ virtual void sawUnsupportedTracks() = 0;
+ virtual float volume() const = 0;
+
+protected:
+ ~WebMediaPlayerClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebMenuItemInfo.h b/Source/WebKit/chromium/public/WebMenuItemInfo.h
new file mode 100644
index 0000000..445dfb4
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebMenuItemInfo.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2009 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 WebMenuItemInfo_h
+#define WebMenuItemInfo_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+struct WebMenuItemInfo {
+ enum Type {
+ Option,
+ CheckableOption,
+ Group,
+ Separator,
+ };
+
+ WebMenuItemInfo()
+ : type(Option)
+ , action(0)
+ , enabled(false)
+ , checked(false)
+ {
+ }
+
+ WebString label;
+ Type type;
+ unsigned action;
+ bool enabled;
+ bool checked;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebMessagePortChannel.h b/Source/WebKit/chromium/public/WebMessagePortChannel.h
new file mode 100644
index 0000000..288bd55
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebMessagePortChannel.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 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 WebMessagePortChannel_h
+#define WebMessagePortChannel_h
+
+#include "WebCommon.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebMessagePortChannelClient;
+class WebString;
+
+typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray;
+
+// Provides an interface to a Message Port Channel implementation. The object owns itself and
+// is signalled that its not needed anymore with the destroy() call.
+class WebMessagePortChannel {
+public:
+ virtual void setClient(WebMessagePortChannelClient*) = 0;
+ virtual void destroy() = 0;
+ // WebKit versions of WebCore::MessagePortChannel.
+ virtual void entangle(WebMessagePortChannel*) = 0;
+ // Callee receives ownership of the passed vector.
+ virtual void postMessage(const WebString&, WebMessagePortChannelArray*) = 0;
+ virtual bool tryGetMessage(WebString*, WebMessagePortChannelArray&) = 0;
+
+protected:
+ ~WebMessagePortChannel() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebMessagePortChannelClient.h b/Source/WebKit/chromium/public/WebMessagePortChannelClient.h
new file mode 100644
index 0000000..0b85bb3
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebMessagePortChannelClient.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2009 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 WebMessagePortChannelClient_h
+#define WebMessagePortChannelClient_h
+
+namespace WebKit {
+
+// Provides an interface for users of WebMessagePortChannel to be notified
+// when messages are available.
+class WebMessagePortChannelClient {
+public:
+ // Alerts that new messages have arrived, which are retrieved by calling
+ // WebMessagePortChannel::tryGetMessage. Note that this may be called
+ // on any thread.
+ virtual void messageAvailable() = 0;
+
+protected:
+ ~WebMessagePortChannelClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebMimeRegistry.h b/Source/WebKit/chromium/public/WebMimeRegistry.h
new file mode 100644
index 0000000..425753e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebMimeRegistry.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2009 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 WebMimeRegistry_h
+#define WebMimeRegistry_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebString;
+
+class WebMimeRegistry {
+public:
+ enum SupportsType { IsNotSupported, IsSupported, MayBeSupported };
+
+ virtual SupportsType supportsMIMEType(const WebString& mimeType) = 0;
+ virtual SupportsType supportsImageMIMEType(const WebString& mimeType) = 0;
+ virtual SupportsType supportsJavaScriptMIMEType(const WebString& mimeType) = 0;
+ virtual SupportsType supportsMediaMIMEType(const WebString& mimeType,
+ const WebString& codecs) = 0;
+ virtual SupportsType supportsNonImageMIMEType(const WebString& mimeType) = 0;
+
+ virtual WebString mimeTypeForExtension(const WebString& fileExtension) = 0;
+ virtual WebString mimeTypeFromFile(const WebString& filePath) = 0;
+ virtual WebString preferredExtensionForMIMEType(const WebString& mimeType) = 0;
+
+protected:
+ ~WebMimeRegistry() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNamedNodeMap.h b/Source/WebKit/chromium/public/WebNamedNodeMap.h
new file mode 100644
index 0000000..0b7e296
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNamedNodeMap.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 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 WebNamedNodeMap_h
+#define WebNamedNodeMap_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class NamedNodeMap; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebAttribute;
+
+// Provides readonly access to some properties of a DOM attribute map.
+class WebNamedNodeMap {
+public:
+ ~WebNamedNodeMap() { reset(); }
+
+ WebNamedNodeMap() { }
+ WebNamedNodeMap(const WebNamedNodeMap& n) { assign(n); }
+ WebNamedNodeMap& operator=(const WebNamedNodeMap& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNamedNodeMap&);
+
+ WEBKIT_API unsigned length() const;
+ WEBKIT_API WebAttribute attributeItem(unsigned) const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebNamedNodeMap(const WTF::PassRefPtr<WebCore::NamedNodeMap>&);
+#endif
+
+private:
+ WebPrivatePtr<WebCore::NamedNodeMap> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNavigationPolicy.h b/Source/WebKit/chromium/public/WebNavigationPolicy.h
new file mode 100644
index 0000000..54bee9d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNavigationPolicy.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 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 WebNavigationPolicy_h
+#define WebNavigationPolicy_h
+
+namespace WebKit {
+
+enum WebNavigationPolicy {
+ WebNavigationPolicyIgnore,
+ WebNavigationPolicyDownload,
+ WebNavigationPolicyCurrentTab,
+ WebNavigationPolicyNewBackgroundTab,
+ WebNavigationPolicyNewForegroundTab,
+ WebNavigationPolicyNewWindow,
+ WebNavigationPolicyNewPopup,
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNavigationType.h b/Source/WebKit/chromium/public/WebNavigationType.h
new file mode 100644
index 0000000..8ca8dc6
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNavigationType.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2009 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 WebNavigationType_h
+#define WebNavigationType_h
+
+namespace WebKit {
+
+enum WebNavigationType {
+ WebNavigationTypeLinkClicked,
+ WebNavigationTypeFormSubmitted,
+ WebNavigationTypeBackForward,
+ WebNavigationTypeReload,
+ WebNavigationTypeFormResubmitted,
+ WebNavigationTypeOther
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNode.h b/Source/WebKit/chromium/public/WebNode.h
new file mode 100644
index 0000000..7116dfa
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNode.h
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2009 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 WebNode_h
+#define WebNode_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+#include "WebString.h"
+
+namespace WebCore { class Node; }
+
+namespace WebKit {
+class WebDOMEventListener;
+class WebDOMEventListenerPrivate;
+class WebDocument;
+class WebFrame;
+class WebNodeList;
+
+// Provides access to some properties of a DOM node.
+class WebNode {
+public:
+ virtual ~WebNode() { reset(); }
+
+ WebNode() { }
+ WebNode(const WebNode& n) { assign(n); }
+ WebNode& operator=(const WebNode& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNode&);
+
+ WEBKIT_API bool equals(const WebNode&) const;
+ // Required for using WebNodes in std maps. Note the order used is
+ // arbitrary and should not be expected to have any specific meaning.
+ WEBKIT_API bool lessThan(const WebNode&) const;
+
+ bool isNull() const { return m_private.isNull(); }
+
+ enum NodeType {
+ ElementNode = 1,
+ AttributeNode,
+ TextNode,
+ CDataSectionNode,
+ EntityReferenceNode,
+ EntityNode,
+ ProcessingInstructionsNode,
+ CommentNode,
+ DocumentNode,
+ DocumentTypeNode,
+ DocumentFragmentNode,
+ NotationNode,
+ XPathNamespaceNode
+ };
+ WEBKIT_API NodeType nodeType() const;
+ WEBKIT_API WebNode parentNode() const;
+ WEBKIT_API WebString nodeName() const;
+ WEBKIT_API WebString nodeValue() const;
+ WEBKIT_API bool setNodeValue(const WebString&);
+ WEBKIT_API WebDocument document() const;
+ WEBKIT_API WebNode firstChild() const;
+ WEBKIT_API WebNode lastChild() const;
+ WEBKIT_API WebNode previousSibling() const;
+ WEBKIT_API WebNode nextSibling() const;
+ WEBKIT_API bool hasChildNodes() const;
+ WEBKIT_API WebNodeList childNodes();
+ WEBKIT_API WebString createMarkup() const;
+ WEBKIT_API bool isTextNode() const;
+ WEBKIT_API bool isContentEditable() const;
+ WEBKIT_API bool isElementNode() const;
+ WEBKIT_API void addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
+ WEBKIT_API void removeEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
+ WEBKIT_API void simulateClick();
+ WEBKIT_API WebNodeList getElementsByTagName(const WebString&) const;
+
+ // Returns true if the node has a non-empty bounding box in layout.
+ // This does not 100% guarantee the user can see it, but is pretty close.
+ // Note: This method only works properly after layout has occurred.
+ WEBKIT_API bool hasNonEmptyBoundingBox() const;
+
+ template<typename T> T to()
+ {
+ T res;
+ res.WebNode::assign(*this);
+ return res;
+ }
+
+ template<typename T> const T toConst() const
+ {
+ T res;
+ res.WebNode::assign(*this);
+ return res;
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebNode(const WTF::PassRefPtr<WebCore::Node>&);
+ WebNode& operator=(const WTF::PassRefPtr<WebCore::Node>&);
+ operator WTF::PassRefPtr<WebCore::Node>() const;
+#endif
+
+#if WEBKIT_IMPLEMENTATION
+ template<typename T> T* unwrap()
+ {
+ return static_cast<T*>(m_private.get());
+ }
+
+ template<typename T> const T* constUnwrap() const
+ {
+ return static_cast<const T*>(m_private.get());
+ }
+#endif
+
+protected:
+ WebPrivatePtr<WebCore::Node> m_private;
+};
+
+inline bool operator==(const WebNode& a, const WebNode& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebNode& a, const WebNode& b)
+{
+ return !(a == b);
+}
+
+inline bool operator<(const WebNode& a, const WebNode& b)
+{
+ return a.lessThan(b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNodeCollection.h b/Source/WebKit/chromium/public/WebNodeCollection.h
new file mode 100644
index 0000000..fee4f44
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNodeCollection.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2009 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 WebNodeCollection_h
+#define WebNodeCollection_h
+
+#include "WebCommon.h"
+
+namespace WebCore { class HTMLCollection; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebNode;
+
+// Provides readonly access to some properties of a DOM node.
+class WebNodeCollection {
+public:
+ ~WebNodeCollection() { reset(); }
+
+ WebNodeCollection() : m_private(0) { }
+ WebNodeCollection(const WebNodeCollection& n) : m_private(0) { assign(n); }
+ WebNodeCollection& operator=(const WebNodeCollection& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNodeCollection&);
+
+ WEBKIT_API unsigned length() const;
+ WEBKIT_API WebNode nextItem() const;
+ WEBKIT_API WebNode firstItem() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebNodeCollection(const WTF::PassRefPtr<WebCore::HTMLCollection>&);
+#endif
+
+private:
+ void assign(WebCore::HTMLCollection*);
+ WebCore::HTMLCollection* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNodeList.h b/Source/WebKit/chromium/public/WebNodeList.h
new file mode 100644
index 0000000..23efab0
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNodeList.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2009 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 WebNodeList_h
+#define WebNodeList_h
+
+#include "WebCommon.h"
+
+namespace WebCore { class NodeList; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebNode;
+
+// Provides readonly access to some properties of a DOM node.
+class WebNodeList {
+public:
+ ~WebNodeList() { reset(); }
+
+ WebNodeList() : m_private(0) { }
+ WebNodeList(const WebNodeList& n) : m_private(0) { assign(n); }
+ WebNodeList& operator=(const WebNodeList& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNodeList&);
+
+ WEBKIT_API unsigned length() const;
+ WEBKIT_API WebNode item(size_t) const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebNodeList(const WTF::PassRefPtr<WebCore::NodeList>&);
+#endif
+
+private:
+ void assign(WebCore::NodeList*);
+ WebCore::NodeList* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNonCopyable.h b/Source/WebKit/chromium/public/WebNonCopyable.h
new file mode 100644
index 0000000..b0bd456
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNonCopyable.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2009 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 WebNonCopyable_h
+#define WebNonCopyable_h
+
+namespace WebKit {
+
+// A base class to extend from if you do not support copying.
+class WebNonCopyable {
+protected:
+ WebNonCopyable() { }
+ ~WebNonCopyable() { }
+
+private:
+ WebNonCopyable(const WebNonCopyable&);
+ WebNonCopyable& operator=(const WebNonCopyable&);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNotification.h b/Source/WebKit/chromium/public/WebNotification.h
new file mode 100644
index 0000000..dbbde02
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNotification.h
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2009 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 WebNotification_h
+#define WebNotification_h
+
+#include "WebCommon.h"
+#include "WebTextDirection.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Notification; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebNotificationPrivate;
+class WebURL;
+class WebString;
+
+// Represents access to a desktop notification.
+class WebNotification {
+public:
+ WebNotification() : m_private(0) { }
+ WebNotification(const WebNotification& other) : m_private(0) { assign(other); }
+
+ ~WebNotification() { reset(); }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNotification&);
+
+ WebNotification& operator=(const WebNotification& other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ // Operators required to put WebNotification in an ordered map.
+ bool equals(const WebNotification& other) const { return m_private == other.m_private; }
+ WEBKIT_API bool lessThan(const WebNotification& other) const;
+
+ // Is the notification HTML vs. icon-title-text?
+ WEBKIT_API bool isHTML() const;
+
+ // If HTML, the URL which contains the contents of the notification.
+ WEBKIT_API WebURL url() const;
+
+ WEBKIT_API WebURL iconURL() const;
+ WEBKIT_API WebString title() const;
+ WEBKIT_API WebString body() const;
+
+ // FIXME: Remove dir() when no longer referenced.
+ // dir() is deprecated; use direction().
+ WEBKIT_API WebString dir() const;
+ WEBKIT_API WebTextDirection direction() const;
+
+ WEBKIT_API WebString replaceId() const;
+
+ // Called if the presenter goes out of scope before the notification does.
+ WEBKIT_API void detachPresenter();
+
+ // Called to indicate the notification has been displayed.
+ WEBKIT_API void dispatchDisplayEvent();
+
+ // Called to indicate an error has occurred with this notification.
+ WEBKIT_API void dispatchErrorEvent(const WebString& errorMessage);
+
+ // Called to indicate the notification has been closed. If it was
+ // closed by the user (as opposed to automatically by the system),
+ // the byUser parameter will be true.
+ WEBKIT_API void dispatchCloseEvent(bool byUser);
+
+ // Called to indicate the notification was clicked on.
+ WEBKIT_API void dispatchClickEvent();
+
+#if WEBKIT_IMPLEMENTATION
+ WebNotification(const WTF::PassRefPtr<WebCore::Notification>&);
+ WebNotification& operator=(const WTF::PassRefPtr<WebCore::Notification>&);
+ operator WTF::PassRefPtr<WebCore::Notification>() const;
+#endif
+
+private:
+ void assign(WebNotificationPrivate*);
+ WebNotificationPrivate* m_private;
+};
+
+inline bool operator==(const WebNotification& a, const WebNotification& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebNotification& a, const WebNotification& b)
+{
+ return !a.equals(b);
+}
+
+inline bool operator<(const WebNotification& a, const WebNotification& b)
+{
+ return a.lessThan(b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNotificationPermissionCallback.h b/Source/WebKit/chromium/public/WebNotificationPermissionCallback.h
new file mode 100644
index 0000000..07e85ee
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNotificationPermissionCallback.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2009 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 WebNotificationPermissionCallback_h
+#define WebNotificationPermissionCallback_h
+
+namespace WebKit {
+
+// Callback object used with WebNotificationPresenter.
+class WebNotificationPermissionCallback {
+public:
+ // Method to be invoked when the async permission request involving
+ // this object has been completed.
+ virtual void permissionRequestComplete() = 0;
+
+protected:
+ // This object is to be destroyed after the callback is invoked;
+ // it should not be directly destroyed.
+ ~WebNotificationPermissionCallback() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebNotificationPresenter.h b/Source/WebKit/chromium/public/WebNotificationPresenter.h
new file mode 100644
index 0000000..9fb7e6e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebNotificationPresenter.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2009 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 WebNotificationPresenter_h
+#define WebNotificationPresenter_h
+
+#include "WebNotificationPermissionCallback.h"
+#include "WebSecurityOrigin.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebDocument;
+class WebNotification;
+class WebURL;
+
+// Provides the services to show desktop notifications to the user.
+class WebNotificationPresenter {
+public:
+ enum Permission {
+ PermissionAllowed, // User has allowed permission to the origin.
+ PermissionNotAllowed, // User has not taken an action on the origin (defaults to not allowed).
+ PermissionDenied // User has explicitly denied permission from the origin.
+ };
+
+ // Shows a notification.
+ virtual bool show(const WebNotification&) = 0;
+
+ // Cancels a notification previously shown, and removes it if being shown.
+ virtual void cancel(const WebNotification&) = 0;
+
+ // Indiciates that the notification object subscribed to events for a previously shown notification is
+ // being destroyed. Does _not_ remove the notification if being shown, but detaches it from receiving events.
+ virtual void objectDestroyed(const WebNotification&) = 0;
+
+ // Checks the permission level for the given origin.
+ virtual Permission checkPermission(const WebURL&) = 0;
+
+ // Requests permission for a given origin. This operation is asynchronous and the callback provided
+ // will be invoked when the permission decision is made. Callback pointer must remain
+ // valid until called.
+ virtual void requestPermission(const WebSecurityOrigin&, WebNotificationPermissionCallback*) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebOptionElement.h b/Source/WebKit/chromium/public/WebOptionElement.h
new file mode 100644
index 0000000..24a6eaa
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebOptionElement.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 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 WebOptionElement_h
+#define WebOptionElement_h
+
+#include "WebFormControlElement.h"
+#include "WebVector.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLOptionElement; }
+#endif
+
+namespace WebKit {
+
+// Provides readonly access to some properties of a DOM option element node.
+class WebOptionElement : public WebFormControlElement {
+public:
+ WebOptionElement() : WebFormControlElement() { }
+ WebOptionElement(const WebOptionElement& element) : WebFormControlElement(element) { }
+
+ WebOptionElement& operator=(const WebOptionElement& element)
+ {
+ WebFormControlElement::assign(element);
+ return *this;
+ }
+ void assign(const WebOptionElement& element) { WebFormControlElement::assign(element); }
+
+ WEBKIT_API void setValue(const WebString&);
+ WEBKIT_API WebString value() const;
+
+ WEBKIT_API int index() const;
+ WEBKIT_API WebString text() const;
+ WEBKIT_API bool defaultSelected() const;
+ WEBKIT_API void setDefaultSelected(bool);
+ WEBKIT_API WebString label() const;
+ WEBKIT_API bool isEnabled() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebOptionElement(const WTF::PassRefPtr<WebCore::HTMLOptionElement>&);
+ WebOptionElement& operator=(const WTF::PassRefPtr<WebCore::HTMLOptionElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLOptionElement>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPageSerializer.h b/Source/WebKit/chromium/public/WebPageSerializer.h
new file mode 100644
index 0000000..94f7994
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPageSerializer.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2009 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 WebPageSerializer_h
+#define WebPageSerializer_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+class WebFrame;
+class WebPageSerializerClient;
+class WebString;
+class WebURL;
+template <typename T> class WebVector;
+
+// Get html data by serializing all frames of current page with lists
+// which contain all resource links that have local copy.
+class WebPageSerializer {
+public:
+ // This function will find out all frames and serialize them to HTML data.
+ // We have a data buffer to temporary saving generated html data. We will
+ // sequentially call WebPageSeriazlierClient once the data buffer is full.
+ //
+ // Return false means no available frame has been serialized, otherwise
+ // return true.
+ //
+ // The parameter frame specifies which frame need to be serialized.
+ // The parameter recursive specifies whether we need to
+ // serialize all sub frames of the specified frame or not.
+ // The parameter client specifies the pointer of interface
+ // WebPageSerializerClient providing a sink interface to receive the
+ // individual chunks of data to be saved.
+ // The parameter links contain original URLs of all saved links.
+ // The parameter localPaths contain corresponding local file paths of all
+ // saved links, which matched with vector:links one by one.
+ // The parameter localDirectoryName is relative path of directory which
+ // contain all saved auxiliary files included all sub frames and resources.
+ WEBKIT_API static bool serialize(WebFrame* frame,
+ bool recursive,
+ WebPageSerializerClient* client,
+ const WebVector<WebURL>& links,
+ const WebVector<WebString>& localPaths,
+ const WebString& localDirectoryName);
+
+ // FIXME: The following are here for unit testing purposes. Consider
+ // changing the unit tests instead.
+
+ // Generate the META for charset declaration.
+ WEBKIT_API static WebString generateMetaCharsetDeclaration(const WebString& charset);
+ // Generate the MOTW declaration.
+ WEBKIT_API static WebString generateMarkOfTheWebDeclaration(const WebURL& url);
+ // Generate the default base tag declaration.
+ WEBKIT_API static WebString generateBaseTagDeclaration(const WebString& baseTarget);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPageSerializerClient.h b/Source/WebKit/chromium/public/WebPageSerializerClient.h
new file mode 100644
index 0000000..c30ddbc
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPageSerializerClient.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2009 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 WebPageSerializerClient_h
+#define WebPageSerializerClient_h
+
+namespace WebKit {
+class WebCString;
+class WebURL;
+
+// This class is used for providing sink interface that can be used to receive
+// the individual chunks of data to be saved.
+class WebPageSerializerClient {
+public:
+ // This enum indicates This sink interface can receive the individual chunks
+ // of serialized data to be saved, so we use values of following enum
+ // definition to indicate the serialization status of serializing all html
+ // content. If current frame is not complete serialized, call
+ // didSerializeDataForFrame with URL of current frame, data, data length and
+ // flag CurrentFrameIsNotFinished.
+ // If current frame is complete serialized, call didSerializeDataForFrame
+ // with URL of current frame, data, data length and flag
+ // CurrentFrameIsFinished.
+ // If all frames of page are complete serialized, call
+ // didSerializeDataForFrame with empty URL, empty data, 0 and flag
+ // AllFramesAreFinished.
+ enum PageSerializationStatus {
+ CurrentFrameIsNotFinished,
+ CurrentFrameIsFinished,
+ AllFramesAreFinished,
+ };
+
+ // Receive the individual chunks of serialized and encoded data to be saved.
+ // The parameter frameURL specifies what frame the data belongs. The
+ // parameter data contains the available data for saving. The parameter
+ // status indicates the status of data serialization.
+ virtual void didSerializeDataForFrame(const WebURL& frameURL,
+ const WebCString& data,
+ PageSerializationStatus status) = 0;
+ WebPageSerializerClient() { }
+
+protected:
+ virtual ~WebPageSerializerClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPasswordAutocompleteListener.h b/Source/WebKit/chromium/public/WebPasswordAutocompleteListener.h
new file mode 100644
index 0000000..fdc8476
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPasswordAutocompleteListener.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 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 WebPasswordAutocompleteListener_h
+#define WebPasswordAutocompleteListener_h
+
+namespace WebKit {
+class WebString;
+
+class WebPasswordAutocompleteListener {
+public:
+ virtual ~WebPasswordAutocompleteListener() {}
+
+ virtual void didBlurInputElement(
+ const WebString& userInput) = 0;
+
+ virtual void performInlineAutocomplete(
+ const WebString& userInput,
+ bool backSpaceOrDeletePressed,
+ bool showSuggestions) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPasswordFormData.h b/Source/WebKit/chromium/public/WebPasswordFormData.h
new file mode 100644
index 0000000..30ce5ca
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPasswordFormData.h
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2009 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 WebPasswordFormData_h
+#define WebPasswordFormData_h
+
+#include "WebFormElement.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+namespace WebKit {
+
+struct WebPasswordFormData {
+ // If the provided form is suitable for password completion, isValid() will
+ // return true;
+ WEBKIT_API WebPasswordFormData(const WebFormElement&);
+
+ // If creation failed, return false.
+ bool isValid() const { return action.isValid(); }
+
+ // The action target of the form. This is the primary data used by the
+ // PasswordManager for form autofill; that is, the action of the saved
+ // credentials must match the action of the form on the page to be autofilled.
+ // If this is empty / not available, it will result in a "restricted"
+ // IE-like autofill policy, where we wait for the user to type in his
+ // username before autofilling the password. In these cases, after successful
+ // login the action URL will automatically be assigned by the
+ // PasswordManager.
+ //
+ // When parsing an HTML form, this must always be set.
+ WebURL action;
+
+ // The "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, and
+ // contains the HTTP realm for dialog-based forms).
+ // The signon_realm is effectively the primary key used for retrieving
+ // data from the database, so it must not be empty.
+ WebString signonRealm;
+
+ // The URL (minus query parameters) containing the form. This is the primary
+ // data used by the PasswordManager to decide (in longest matching prefix
+ // fashion) whether or not a given PasswordForm result from the database is a
+ // good fit for a particular form on a page, so it must not be empty.
+ WebURL origin;
+
+ // The name of the submit button used. Optional; only used in scoring
+ // of PasswordForm results from the database to make matches as tight as
+ // possible.
+ //
+ // When parsing an HTML form, this must always be set.
+ WebString submitElement;
+
+ // The name of the username input element. Optional (improves scoring).
+ //
+ // When parsing an HTML form, this must always be set.
+ WebString userNameElement;
+
+ // The username. Optional.
+ //
+ // When parsing an HTML form, this is typically empty unless the site
+ // has implemented some form of autofill.
+ WebString userNameValue;
+
+ // The name of the password input element, Optional (improves scoring).
+ //
+ // When parsing an HTML form, this must always be set.
+ WebString passwordElement;
+
+ // The password. Required.
+ //
+ // When parsing an HTML form, this is typically empty.
+ WebString passwordValue;
+
+ // If the form was a change password form, the name of the
+ // 'old password' input element. Optional.
+ WebString oldPasswordElement;
+
+ // The old password. Optional.
+ WebString oldPasswordValue;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPerformance.h b/Source/WebKit/chromium/public/WebPerformance.h
new file mode 100644
index 0000000..c7a728e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPerformance.h
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2010 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 WebPerformance_h
+#define WebPerformance_h
+
+#include "WebCommon.h"
+#include "WebNavigationType.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class Performance; }
+
+namespace WebKit {
+
+class WebPerformance {
+public:
+ ~WebPerformance() { reset(); }
+
+ WebPerformance() { }
+
+ WebPerformance(const WebPerformance& p) { assign(p); }
+
+ WebPerformance& operator=(const WebPerformance& p)
+ {
+ assign(p);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebPerformance&);
+
+ // This only returns one of {Other|Reload|BackForward}.
+ // Form submits and link clicks all fall under other.
+ WEBKIT_API WebNavigationType navigationType() const;
+
+ WEBKIT_API double navigationStart() const;
+ WEBKIT_API double unloadEventEnd() const;
+ WEBKIT_API double redirectStart() const;
+ WEBKIT_API double redirectEnd() const;
+ WEBKIT_API unsigned short redirectCount() const;
+ WEBKIT_API double fetchStart() const;
+ WEBKIT_API double domainLookupStart() const;
+ WEBKIT_API double domainLookupEnd() const;
+ WEBKIT_API double connectStart() const;
+ WEBKIT_API double connectEnd() const;
+ WEBKIT_API double requestStart() const;
+ WEBKIT_API double responseStart() const;
+ WEBKIT_API double responseEnd() const;
+ WEBKIT_API double domLoading() const;
+ WEBKIT_API double domInteractive() const;
+ WEBKIT_API double domContentLoadedEventStart() const;
+ WEBKIT_API double domContentLoadedEventEnd() const;
+ WEBKIT_API double domComplete() const;
+ WEBKIT_API double loadEventStart() const;
+ WEBKIT_API double loadEventEnd() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebPerformance(const WTF::PassRefPtr<WebCore::Performance>&);
+ WebPerformance& operator=(const WTF::PassRefPtr<WebCore::Performance>&);
+ operator WTF::PassRefPtr<WebCore::Performance>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::Performance> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPlugin.h b/Source/WebKit/chromium/public/WebPlugin.h
new file mode 100644
index 0000000..4a6f081
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPlugin.h
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2009 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 WebPlugin_h
+#define WebPlugin_h
+
+#include "WebCanvas.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+struct NPObject;
+
+namespace WebKit {
+
+class WebDataSource;
+class WebFrame;
+class WebInputEvent;
+class WebPluginContainer;
+class WebURLResponse;
+struct WebCursorInfo;
+struct WebPluginParams;
+struct WebPoint;
+struct WebRect;
+struct WebURLError;
+template <typename T> class WebVector;
+
+class WebPlugin {
+public:
+ virtual bool initialize(WebPluginContainer*) = 0;
+ virtual void destroy() = 0;
+
+ virtual NPObject* scriptableObject() = 0;
+
+ virtual void paint(WebCanvas*, const WebRect&) = 0;
+
+ // Coordinates are relative to the containing window.
+ virtual void updateGeometry(
+ const WebRect& frameRect, const WebRect& clipRect,
+ const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0;
+
+ // If the plugin instance is backed by an OpenGL texture, return its ID in the
+ // compositors namespace. Otherwise return 0. Returns 0 by default.
+ virtual unsigned getBackingTextureId() { return 0; }
+
+ virtual void updateFocus(bool) = 0;
+ virtual void updateVisibility(bool) = 0;
+
+ virtual bool acceptsInputEvents() = 0;
+ virtual bool handleInputEvent(const WebInputEvent&, WebCursorInfo&) = 0;
+
+ virtual void didReceiveResponse(const WebURLResponse&) = 0;
+ virtual void didReceiveData(const char* data, int dataLength) = 0;
+ virtual void didFinishLoading() = 0;
+ virtual void didFailLoading(const WebURLError&) = 0;
+
+ // Called in response to WebPluginContainer::loadFrameRequest
+ virtual void didFinishLoadingFrameRequest(
+ const WebURL&, void* notifyData) = 0;
+ virtual void didFailLoadingFrameRequest(
+ const WebURL&, void* notifyData, const WebURLError&) = 0;
+
+ // Printing interface.
+ // Whether the plugin supports its own paginated print. The other print
+ // interface methods are called only if this method returns true.
+ virtual bool supportsPaginatedPrint() { return false; }
+ // Sets up printing at the given print rect and printer DPI. printableArea
+ // is in points (a point is 1/72 of an inch).Returns the number of pages to
+ // be printed at these settings.
+ virtual int printBegin(const WebRect& printableArea, int printerDPI) { return 0; }
+ // Prints the page specified by pageNumber (0-based index) into the supplied canvas.
+ virtual bool printPage(int pageNumber, WebCanvas* canvas) { return false; }
+ // Ends the print operation.
+ virtual void printEnd() { }
+
+ virtual bool hasSelection() const { return false; }
+ virtual WebString selectionAsText() const { return WebString(); }
+ virtual WebString selectionAsMarkup() const { return WebString(); }
+
+ // If the given position is over a link, returns the absolute url.
+ // Otherwise an empty url is returned.
+ virtual WebURL linkAtPosition(const WebPoint& position) const { return WebURL(); }
+
+ // Used for zooming of full page plugins.
+ virtual void setZoomLevel(double level, bool textOnly) { }
+
+ // Find interface.
+ // Start a new search. The plugin should search for a little bit at a time so that it
+ // doesn't block the thread in case of a large document. The results, along with the
+ // find's identifier, should be sent asynchronously to WebFrameClient's reportFindInPage* methods.
+ // Returns true if the search started, or false if the plugin doesn't support search.
+ virtual bool startFind(const WebString& searchText, bool caseSensitive, int identifier) { return false; }
+ // Tells the plugin to jump forward or backward in the list of find results.
+ virtual void selectFindResult(bool forward) { }
+ // Tells the plugin that the user has stopped the find operation.
+ virtual void stopFind() { }
+
+protected:
+ ~WebPlugin() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPluginContainer.h b/Source/WebKit/chromium/public/WebPluginContainer.h
new file mode 100644
index 0000000..c580f81
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPluginContainer.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2009 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 WebPluginContainer_h
+#define WebPluginContainer_h
+
+struct NPObject;
+
+namespace WebKit {
+
+class WebElement;
+class WebPlugin;
+class WebString;
+class WebURL;
+class WebURLRequest;
+struct WebRect;
+
+class WebPluginContainer {
+public:
+ // Returns the element containing this plugin.
+ virtual WebElement element() = 0;
+
+ virtual void invalidate() = 0;
+ virtual void invalidateRect(const WebRect&) = 0;
+ virtual void scrollRect(int dx, int dy, const WebRect&) = 0;
+
+ // Causes the container to report its current geometry via
+ // WebPlugin::updateGeometry.
+ virtual void reportGeometry() = 0;
+
+ // Called when the backing texture is ready to be composited.
+ virtual void commitBackingTexture() {}
+
+ // Drop any references to script objects allocated by the plugin.
+ // These are objects derived from WebPlugin::scriptableObject. This is
+ // called when the plugin is being destroyed or if it needs to be
+ // re-initialized.
+ virtual void clearScriptObjects() = 0;
+
+ // Returns the scriptable object associated with the DOM element
+ // containing the plugin.
+ virtual NPObject* scriptableObjectForElement() = 0;
+
+ // Executes a "javascript:" URL on behalf of the plugin in the context
+ // of the frame containing the plugin. Returns the result of script
+ // execution, if any.
+ virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0;
+
+ // Loads an URL in the specified frame (or the frame containing this
+ // plugin if target is empty). If notifyNeeded is true, then upon
+ // completion, WebPlugin::didFinishLoadingFrameRequest is called if the
+ // load was successful or WebPlugin::didFailLoadingFrameRequest is
+ // called if the load failed. The given notifyData is passed along to
+ // the callback.
+ virtual void loadFrameRequest(
+ const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData) = 0;
+
+ // Notifies that the zoom level has changed.
+ virtual void zoomLevelChanged(double zoomLevel) = 0;
+
+ virtual WebPlugin* plugin() = 0;
+ virtual void setPlugin(WebPlugin*) = 0;
+
+protected:
+ ~WebPluginContainer() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPluginDocument.h b/Source/WebKit/chromium/public/WebPluginDocument.h
new file mode 100644
index 0000000..b772cf7
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPluginDocument.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 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 WebPluginDocument_h
+#define WebPluginDocument_h
+
+#include "WebDocument.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class PluginDocument; }
+#endif
+
+namespace WebKit {
+class WebPlugin;
+
+// Wraps a WebDocument for full page plugins.
+class WebPluginDocument : public WebDocument {
+public:
+ WebPluginDocument() { }
+ WebPluginDocument(const WebPluginDocument& e) : WebDocument(e) { }
+
+ WebPluginDocument& operator=(const WebPluginDocument& e)
+ {
+ WebNode::assign(e);
+ return *this;
+ }
+ void assign(const WebPluginDocument& d) { WebNode::assign(d); }
+
+ WEBKIT_API WebPlugin* plugin();
+
+#if WEBKIT_IMPLEMENTATION
+ WebPluginDocument(const WTF::PassRefPtr<WebCore::PluginDocument>&);
+ WebPluginDocument& operator=(const WTF::PassRefPtr<WebCore::PluginDocument>&);
+ operator WTF::PassRefPtr<WebCore::PluginDocument>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPluginListBuilder.h b/Source/WebKit/chromium/public/WebPluginListBuilder.h
new file mode 100644
index 0000000..4bd427d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPluginListBuilder.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2009 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 WebPluginListBuilder_h
+#define WebPluginListBuilder_h
+
+namespace WebKit {
+
+class WebString;
+
+// An interface for building a list of known plugins.
+class WebPluginListBuilder {
+public:
+ virtual void addPlugin(
+ const WebString& name, const WebString& description,
+ const WebString& fileName) = 0;
+
+ virtual void addMediaTypeToLastPlugin(
+ const WebString& name, const WebString& description) = 0;
+
+ virtual void addFileExtensionToLastMediaType(
+ const WebString& fileExtension) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPluginParams.h b/Source/WebKit/chromium/public/WebPluginParams.h
new file mode 100644
index 0000000..5d03204
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPluginParams.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2009 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 WebPluginParams_h
+#define WebPluginParams_h
+
+#include "WebString.h"
+#include "WebURL.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+struct WebPluginParams {
+ WebURL url;
+ WebString mimeType;
+ WebVector<WebString> attributeNames;
+ WebVector<WebString> attributeValues;
+ bool loadManually;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPoint.h b/Source/WebKit/chromium/public/WebPoint.h
new file mode 100644
index 0000000..20c52c2
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPoint.h
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2009 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 WebPoint_h
+#define WebPoint_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "IntPoint.h"
+#else
+#include <gfx/point.h>
+#endif
+
+namespace WebKit {
+
+struct WebPoint {
+ int x;
+ int y;
+
+ WebPoint()
+ : x(0)
+ , y(0)
+ {
+ }
+
+ WebPoint(int x, int y)
+ : x(x)
+ , y(y)
+ {
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebPoint(const WebCore::IntPoint& p)
+ : x(p.x())
+ , y(p.y())
+ {
+ }
+
+ WebPoint& operator=(const WebCore::IntPoint& p)
+ {
+ x = p.x();
+ y = p.y();
+ return *this;
+ }
+
+ operator WebCore::IntPoint() const
+ {
+ return WebCore::IntPoint(x, y);
+ }
+#else
+ WebPoint(const gfx::Point& p)
+ : x(p.x())
+ , y(p.y())
+ {
+ }
+
+ WebPoint& operator=(const gfx::Point& p)
+ {
+ x = p.x();
+ y = p.y();
+ return *this;
+ }
+
+ operator gfx::Point() const
+ {
+ return gfx::Point(x, y);
+ }
+#endif
+};
+
+inline bool operator==(const WebPoint& a, const WebPoint& b)
+{
+ return a.x == b.x && a.y == b.y;
+}
+
+inline bool operator!=(const WebPoint& a, const WebPoint& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPopupMenu.h b/Source/WebKit/chromium/public/WebPopupMenu.h
new file mode 100644
index 0000000..c2cdec3
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPopupMenu.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 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 WebPopupMenu_h
+#define WebPopupMenu_h
+
+#include "WebCommon.h"
+#include "WebWidget.h"
+
+namespace WebKit {
+
+class WebWidgetClient;
+
+class WebPopupMenu : public WebWidget {
+public:
+ WEBKIT_API static WebPopupMenu* create(WebWidgetClient*);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPopupMenuInfo.h b/Source/WebKit/chromium/public/WebPopupMenuInfo.h
new file mode 100644
index 0000000..7cf1b63
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPopupMenuInfo.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 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 WebPopupMenuInfo_h
+#define WebPopupMenuInfo_h
+
+#include "WebMenuItemInfo.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+// Describes the contents of a popup menu.
+struct WebPopupMenuInfo {
+ // FIXME: migrate clients to WebMenuItemInfo and remove this temporary Item typedef.
+ typedef WebMenuItemInfo Item;
+ int itemHeight;
+ int itemFontSize;
+ int selectedIndex;
+ WebVector<WebMenuItemInfo> items;
+ bool rightAligned;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPopupType.h b/Source/WebKit/chromium/public/WebPopupType.h
new file mode 100644
index 0000000..8a546ba
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPopupType.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 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 WebPopupType_h
+#define WebPopupType_h
+
+namespace WebKit {
+
+enum WebPopupType {
+ WebPopupTypeNone, // Not a popup.
+ WebPopupTypeSelect, // A HTML select (combo-box) popup.
+ WebPopupTypeSuggestion, // An autofill/autocomplete popup.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPrivateOwnPtr.h b/Source/WebKit/chromium/public/WebPrivateOwnPtr.h
new file mode 100644
index 0000000..4bcabcf
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPrivateOwnPtr.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 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 WebPrivateOwnPtr_h
+#define WebPrivateOwnPtr_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// This class is an implementation detail of the WebKit API. It exists
+// to help simplify the implementation of WebKit interfaces that merely
+// wrap a pointer to a WebCore class. It's similar to WebPrivatePtr, but it
+// wraps a naked pointer rather than a reference counted.
+// Note: you must call reset(0) on the implementation side in order to delete
+// the WebCore pointer.
+template <typename T>
+class WebPrivateOwnPtr {
+public:
+ WebPrivateOwnPtr() : m_ptr(0) {}
+ ~WebPrivateOwnPtr() { WEBKIT_ASSERT(!m_ptr); }
+
+#if WEBKIT_IMPLEMENTATION
+ explicit WebPrivateOwnPtr(T* ptr)
+ : m_ptr(ptr)
+ {
+ }
+
+ void reset(T* ptr)
+ {
+ delete m_ptr;
+ m_ptr = ptr;
+ }
+
+ T* get() const { return m_ptr; }
+
+ T* operator->() const
+ {
+ WEBKIT_ASSERT(m_ptr);
+ return m_ptr;
+ }
+#endif // WEBKIT_IMPLEMENTATION
+
+private:
+ T* m_ptr;
+
+ WebPrivateOwnPtr(const WebPrivateOwnPtr&);
+ void operator=(const WebPrivateOwnPtr&);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebPrivatePtr.h b/Source/WebKit/chromium/public/WebPrivatePtr.h
new file mode 100644
index 0000000..48ad7f2
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebPrivatePtr.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2010 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 WebPrivatePtr_h
+#define WebPrivatePtr_h
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/PassRefPtr.h>
+#endif
+
+namespace WebKit {
+
+// This class is an implementation detail of the WebKit API. It exists
+// to help simplify the implementation of WebKit interfaces that merely
+// wrap a reference counted WebCore class.
+template <typename T>
+class WebPrivatePtr {
+public:
+ WebPrivatePtr() : m_ptr(0) { }
+ ~WebPrivatePtr() { WEBKIT_ASSERT(!m_ptr); }
+
+ bool isNull() const { return !m_ptr; }
+
+#if WEBKIT_IMPLEMENTATION
+ WebPrivatePtr(const PassRefPtr<T>& prp)
+ : m_ptr(prp.releaseRef())
+ {
+ }
+
+ void reset()
+ {
+ assign(0);
+ }
+
+ WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other)
+ {
+ T* p = other.m_ptr;
+ if (p)
+ p->ref();
+ assign(p);
+ return *this;
+ }
+
+ WebPrivatePtr<T>& operator=(const PassRefPtr<T>& prp)
+ {
+ assign(prp.releaseRef());
+ return *this;
+ }
+
+ T* get() const
+ {
+ return m_ptr;
+ }
+
+ T* operator->() const
+ {
+ ASSERT(m_ptr);
+ return m_ptr;
+ }
+#endif
+
+private:
+#if WEBKIT_IMPLEMENTATION
+ void assign(T* p)
+ {
+ // p is already ref'd for us by the caller
+ if (m_ptr)
+ m_ptr->deref();
+ m_ptr = p;
+ }
+#endif
+
+ T* m_ptr;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebRange.h b/Source/WebKit/chromium/public/WebRange.h
new file mode 100644
index 0000000..89fc8f6
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebRange.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2009 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 WebRange_h
+#define WebRange_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Range; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebNode;
+class WebRangePrivate;
+class WebString;
+
+// Provides readonly access to some properties of a DOM range.
+class WebRange {
+public:
+ ~WebRange() { reset(); }
+
+ WebRange() : m_private(0) { }
+ WebRange(const WebRange& r) : m_private(0) { assign(r); }
+ WebRange& operator=(const WebRange& r)
+ {
+ assign(r);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebRange&);
+
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API int startOffset() const;
+ WEBKIT_API int endOffset() const;
+ WEBKIT_API WebNode startContainer(int& exceptionCode) const;
+ WEBKIT_API WebNode endContainer(int& exceptionCode) const;
+
+ WEBKIT_API WebString toHTMLText() const;
+ WEBKIT_API WebString toPlainText() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebRange(const WTF::PassRefPtr<WebCore::Range>&);
+ WebRange& operator=(const WTF::PassRefPtr<WebCore::Range>&);
+ operator WTF::PassRefPtr<WebCore::Range>() const;
+#endif
+
+private:
+ void assign(WebRangePrivate*);
+ WebRangePrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebRect.h b/Source/WebKit/chromium/public/WebRect.h
new file mode 100644
index 0000000..30381d7
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebRect.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2009 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 WebRect_h
+#define WebRect_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "IntRect.h"
+#else
+#include <gfx/rect.h>
+#endif
+
+namespace WebKit {
+
+struct WebRect {
+ int x;
+ int y;
+ int width;
+ int height;
+
+ bool isEmpty() const { return width <= 0 || height <= 0; }
+
+ WebRect()
+ : x(0)
+ , y(0)
+ , width(0)
+ , height(0)
+ {
+ }
+
+ WebRect(int x, int y, int width, int height)
+ : x(x)
+ , y(y)
+ , width(width)
+ , height(height)
+ {
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebRect(const WebCore::IntRect& r)
+ : x(r.x())
+ , y(r.y())
+ , width(r.width())
+ , height(r.height())
+ {
+ }
+
+ WebRect& operator=(const WebCore::IntRect& r)
+ {
+ x = r.x();
+ y = r.y();
+ width = r.width();
+ height = r.height();
+ return *this;
+ }
+
+ operator WebCore::IntRect() const
+ {
+ return WebCore::IntRect(x, y, width, height);
+ }
+#else
+ WebRect(const gfx::Rect& r)
+ : x(r.x())
+ , y(r.y())
+ , width(r.width())
+ , height(r.height())
+ {
+ }
+
+ WebRect& operator=(const gfx::Rect& r)
+ {
+ x = r.x();
+ y = r.y();
+ width = r.width();
+ height = r.height();
+ return *this;
+ }
+
+ operator gfx::Rect() const
+ {
+ return gfx::Rect(x, y, width, height);
+ }
+#endif
+};
+
+inline bool operator==(const WebRect& a, const WebRect& b)
+{
+ return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;
+}
+
+inline bool operator!=(const WebRect& a, const WebRect& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebRegularExpression.h b/Source/WebKit/chromium/public/WebRegularExpression.h
new file mode 100644
index 0000000..bdf72d8
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebRegularExpression.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 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 WebRegularExpression_h
+#define WebRegularExpression_h
+
+#include "WebCommon.h"
+#include "WebNonCopyable.h"
+#include "WebTextCaseSensitivity.h"
+
+namespace WebKit {
+
+class WebRegularExpressionPrivate;
+class WebString;
+
+class WebRegularExpression : public WebNonCopyable {
+public:
+ WEBKIT_API WebRegularExpression(const WebString& pattern, WebTextCaseSensitivity);
+ WEBKIT_API ~WebRegularExpression();
+
+ WEBKIT_API int match(const WebString&, int startFrom = 0, int* matchLength = 0) const;
+
+private:
+ WebRegularExpressionPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebRuntimeFeatures.h b/Source/WebKit/chromium/public/WebRuntimeFeatures.h
new file mode 100644
index 0000000..5537ee2
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2009 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 WebRuntimeFeatures_h
+#define WebRuntimeFeatures_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// This class is used to enable runtime features of WebKit. It is unspecified
+// whether a feature is enabled by default. In the future, a feature may be
+// promoted from disabled by default to enabled by default once it reaches a
+// certain level of maturity.
+class WebRuntimeFeatures {
+public:
+ WEBKIT_API static void enableDatabase(bool);
+ WEBKIT_API static bool isDatabaseEnabled();
+
+ WEBKIT_API static void enableLocalStorage(bool);
+ WEBKIT_API static bool isLocalStorageEnabled();
+
+ WEBKIT_API static void enableSessionStorage(bool);
+ WEBKIT_API static bool isSessionStorageEnabled();
+
+ WEBKIT_API static void enableMediaPlayer(bool);
+ WEBKIT_API static bool isMediaPlayerEnabled();
+
+ WEBKIT_API static void enableSockets(bool);
+ WEBKIT_API static bool isSocketsEnabled();
+
+ WEBKIT_API static void enableNotifications(bool);
+ WEBKIT_API static bool isNotificationsEnabled();
+
+ WEBKIT_API static void enableApplicationCache(bool);
+ WEBKIT_API static bool isApplicationCacheEnabled();
+
+ WEBKIT_API static void enableGeolocation(bool);
+ WEBKIT_API static bool isGeolocationEnabled();
+
+ WEBKIT_API static void enableIndexedDatabase(bool);
+ WEBKIT_API static bool isIndexedDatabaseEnabled();
+
+ WEBKIT_API static void enableWebGL(bool);
+ WEBKIT_API static bool isWebGLEnabled();
+
+ WEBKIT_API static void enablePushState(bool);
+ WEBKIT_API static bool isPushStateEnabled(bool);
+
+ WEBKIT_API static void enableTouch(bool);
+ WEBKIT_API static bool isTouchEnabled();
+
+ WEBKIT_API static void enableDeviceMotion(bool);
+ WEBKIT_API static bool isDeviceMotionEnabled();
+
+ WEBKIT_API static void enableDeviceOrientation(bool);
+ WEBKIT_API static bool isDeviceOrientationEnabled();
+
+ WEBKIT_API static void enableSpeechInput(bool);
+ WEBKIT_API static bool isSpeechInputEnabled();
+
+ WEBKIT_API static void enableXHRResponseBlob(bool);
+ WEBKIT_API static bool isXHRResponseBlobEnabled();
+
+ WEBKIT_API static void enableFileSystem(bool);
+ WEBKIT_API static bool isFileSystemEnabled();
+
+private:
+ WebRuntimeFeatures();
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebScreenInfo.h b/Source/WebKit/chromium/public/WebScreenInfo.h
new file mode 100644
index 0000000..d3d268a
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebScreenInfo.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2009 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 WebScreenInfo_h
+#define WebScreenInfo_h
+
+#include "WebRect.h"
+
+namespace WebKit {
+
+struct WebScreenInfo {
+ // The screen depth in bits per pixel
+ int depth;
+
+ // The bits per colour component. This assumes that the colours are balanced
+ // equally.
+ int depthPerComponent;
+
+ // This can be true for black and white printers
+ bool isMonochrome;
+
+ // This is set from the rcMonitor member of MONITORINFOEX, to whit:
+ // "A RECT structure that specifies the display monitor rectangle,
+ // expressed in virtual-screen coordinates. Note that if the monitor
+ // is not the primary display monitor, some of the rectangle's
+ // coordinates may be negative values."
+ WebRect rect;
+
+ // This is set from the rcWork member of MONITORINFOEX, to whit:
+ // "A RECT structure that specifies the work area rectangle of the
+ // display monitor that can be used by applications, expressed in
+ // virtual-screen coordinates. Windows uses this rectangle to
+ // maximize an application on the monitor. The rest of the area in
+ // rcMonitor contains system windows such as the task bar and side
+ // bars. Note that if the monitor is not the primary display monitor,
+ // some of the rectangle's coordinates may be negative values".
+ WebRect availableRect;
+
+ WebScreenInfo()
+ : depth(0)
+ , depthPerComponent(0)
+ , isMonochrome(false) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebScriptController.h b/Source/WebKit/chromium/public/WebScriptController.h
new file mode 100644
index 0000000..368f33d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebScriptController.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009 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 WebScriptController_h
+#define WebScriptController_h
+
+#include "WebCommon.h"
+
+namespace v8 {
+class Extension;
+}
+
+namespace WebKit {
+
+class WebString;
+
+class WebScriptController {
+public:
+ // Registers a v8 extension to be available on webpages. The three forms
+ // offer various restrictions on what types of contexts the extension is
+ // loaded into. If a scheme is provided, only pages whose URL has the given
+ // scheme will match. If extensionGroup is provided, the extension will only
+ // be loaded into scripts run via WebFrame::ExecuteInNewWorld with the
+ // matching group.
+ // Will only affect v8 contexts initialized after this call. Takes ownership
+ // of the v8::Extension object passed.
+ WEBKIT_API static void registerExtension(v8::Extension*);
+
+ // Enables special settings which are only applicable if V8 is executed
+ // in the single thread which must be the main thread.
+ // FIXME: make a try to dynamically detect when this condition is broken
+ // and automatically switch off single thread mode.
+ WEBKIT_API static void enableV8SingleThreadMode();
+
+ // Process any pending JavaScript console messages.
+ WEBKIT_API static void flushConsoleMessages();
+
+private:
+ WebScriptController();
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebScriptSource.h b/Source/WebKit/chromium/public/WebScriptSource.h
new file mode 100644
index 0000000..344815b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebScriptSource.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2009 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 WebScriptSource_h
+#define WebScriptSource_h
+
+#include "WebString.h"
+#include "WebURL.h"
+
+namespace WebKit {
+
+struct WebScriptSource {
+ WebString code;
+ WebURL url;
+ int startLine;
+
+ WebScriptSource(const WebString& code)
+ : code(code), startLine(1) { }
+ WebScriptSource(const WebString& code, const WebURL& url)
+ : code(code), url(url), startLine(1) { }
+ WebScriptSource(const WebString& code, const WebURL& url, int startLine)
+ : code(code), url(url), startLine(startLine) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebScrollbar.h b/Source/WebKit/chromium/public/WebScrollbar.h
new file mode 100644
index 0000000..6941f4d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebScrollbar.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 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 WebScrollbar_h
+#define WebScrollbar_h
+
+#include "WebCanvas.h"
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebInputEvent;
+class WebScrollbarClient;
+struct WebRect;
+
+class WebScrollbar {
+public:
+ enum Orientation {
+ Horizontal,
+ Vertical
+ };
+
+ enum ScrollDirection {
+ ScrollBackward,
+ ScrollForward
+ };
+
+ enum ScrollGranularity {
+ ScrollByLine,
+ ScrollByPage,
+ ScrollByDocument,
+ ScrollByPixel
+ };
+
+ // Creates a WebScrollbar.
+ WEBKIT_API static WebScrollbar* create(WebScrollbarClient*, Orientation);
+
+ virtual ~WebScrollbar() {}
+
+ // Gets the thickness of the scrollbar in pixels.
+ WEBKIT_API static int defaultThickness();
+
+ // Sets the rectangle of the scrollbar.
+ virtual void setLocation(const WebRect&) = 0;
+
+ // Gets the current value (i.e. position inside the region).
+ virtual int value() const = 0;
+
+ // Sets the current value.
+ virtual void setValue(int position) = 0;
+
+ // Sets the size of the scrollable region in pixels. i.e. if a document is
+ // 800x10000 pixels and the viewport is 1000x1000 pixels, then setLocation
+ // for the vertical scrollbar would have passed in a rectangle like:
+ // (800 - defaultThickness(), 0) (defaultThickness() x 10000)
+ // and setDocumentSize(10000)
+ virtual void setDocumentSize(int size) = 0;
+
+ // Scroll back or forward with the given granularity.
+ virtual void scroll(ScrollDirection, ScrollGranularity, float multiplier) = 0;
+
+ // Paint the given rectangle.
+ virtual void paint(WebCanvas*, const WebRect&) = 0;
+
+ // Returns true iff the given event was used.
+ virtual bool handleInputEvent(const WebInputEvent&) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebScrollbarClient.h b/Source/WebKit/chromium/public/WebScrollbarClient.h
new file mode 100644
index 0000000..d1825c8
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebScrollbarClient.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 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 WebScrollbarClient_h
+#define WebScrollbarClient_h
+
+namespace WebKit {
+
+class WebScrollbar;
+struct WebRect;
+template <typename T> class WebVector;
+
+class WebScrollbarClient {
+public:
+ virtual void valueChanged(WebScrollbar*) = 0;
+ virtual void invalidateScrollbarRect(WebScrollbar*, const WebRect&) = 0;
+ virtual void getTickmarks(WebScrollbar*, WebVector<WebRect>*) const = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSearchableFormData.h b/Source/WebKit/chromium/public/WebSearchableFormData.h
new file mode 100644
index 0000000..5cd1d9b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSearchableFormData.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009 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 WebSearchableFormData_h
+#define WebSearchableFormData_h
+
+#include "WebString.h"
+#include "WebURL.h"
+
+namespace WebKit {
+class WebFormElement;
+
+// SearchableFormData encapsulates a URL and encoding of an INPUT field that
+// corresponds to a searchable form request.
+class WebSearchableFormData {
+public:
+ // If the provided form is suitable for automated searching, isValid()
+ // will return false.
+ WEBKIT_API WebSearchableFormData(const WebFormElement&);
+
+ bool isValid() { return m_url.isValid(); }
+
+ // URL for the searchable form request.
+ const WebURL& url() const
+ {
+ return m_url;
+ }
+
+ // Encoding used to encode the form parameters; never empty.
+ const WebString& encoding() const
+ {
+ return m_encoding;
+ }
+
+private:
+ WebURL m_url;
+ WebString m_encoding;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSecurityOrigin.h b/Source/WebKit/chromium/public/WebSecurityOrigin.h
new file mode 100644
index 0000000..a241682
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSecurityOrigin.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2010 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 WebSecurityOrigin_h
+#define WebSecurityOrigin_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class SecurityOrigin; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebSecurityOriginPrivate;
+class WebString;
+class WebURL;
+
+class WebSecurityOrigin {
+public:
+ ~WebSecurityOrigin() { reset(); }
+
+ WebSecurityOrigin() : m_private(0) { }
+ WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); }
+ WebSecurityOrigin& operator=(const WebSecurityOrigin& s)
+ {
+ assign(s);
+ return *this;
+ }
+
+ WEBKIT_API static WebSecurityOrigin createFromDatabaseIdentifier(const WebString& databaseIdentifier);
+ WEBKIT_API static WebSecurityOrigin createFromString(const WebString&);
+ WEBKIT_API static WebSecurityOrigin create(const WebURL&);
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebSecurityOrigin&);
+
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebString protocol() const;
+ WEBKIT_API WebString host() const;
+ WEBKIT_API unsigned short port() const;
+
+ // The empty WebSecurityOrigin is the least privileged WebSecurityOrigin.
+ WEBKIT_API bool isEmpty() const;
+
+ // Returns true if this WebSecurityOrigin can script objects in the given
+ // SecurityOrigin. For example, call this function before allowing
+ // script from one security origin to read or write objects from
+ // another SecurityOrigin.
+ WEBKIT_API bool canAccess(const WebSecurityOrigin&) const;
+
+ // Returns true if this WebSecurityOrigin can read content retrieved from
+ // the given URL. For example, call this function before allowing script
+ // from a given security origin to receive contents from a given URL.
+ WEBKIT_API bool canRequest(const WebURL&) const;
+
+ // Returns a string representation of the WebSecurityOrigin. The empty
+ // WebSecurityOrigin is represented by "null". The representation of a
+ // non-empty WebSecurityOrigin resembles a standard URL.
+ WEBKIT_API WebString toString() const;
+
+ // Returns a string representation of this WebSecurityOrigin that can
+ // be used as a file. Should be used in storage APIs only.
+ WEBKIT_API WebString databaseIdentifier() const;
+
+ // Returns true if this WebSecurityOrigin can access usernames and
+ // passwords stored in password manager.
+ WEBKIT_API bool canAccessPasswordManager() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebSecurityOrigin(const WTF::PassRefPtr<WebCore::SecurityOrigin>&);
+ WebSecurityOrigin& operator=(const WTF::PassRefPtr<WebCore::SecurityOrigin>&);
+ operator WTF::PassRefPtr<WebCore::SecurityOrigin>() const;
+ WebCore::SecurityOrigin* get() const;
+#endif
+
+private:
+ void assign(WebSecurityOriginPrivate*);
+ WebSecurityOriginPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSecurityPolicy.h b/Source/WebKit/chromium/public/WebSecurityPolicy.h
new file mode 100644
index 0000000..9cf293d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSecurityPolicy.h
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2009 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 WebSecurityPolicy_h
+#define WebSecurityPolicy_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebString;
+class WebURL;
+
+class WebSecurityPolicy {
+public:
+ // Registers a URL scheme to be treated as a local scheme (i.e., with the
+ // same security rules as those applied to "file" URLs). This means that
+ // normal pages cannot link to or access URLs of this scheme.
+ WEBKIT_API static void registerURLSchemeAsLocal(const WebString&);
+
+ // Registers a URL scheme to be treated as a noAccess scheme. This means
+ // that pages loaded with this URL scheme cannot access pages loaded with
+ // any other URL scheme.
+ WEBKIT_API static void registerURLSchemeAsNoAccess(const WebString&);
+
+ // Registers a URL scheme to be treated as display-isolated. This means
+ // that pages cannot display these URLs unless they are from the same
+ // scheme. For example, pages in other origin cannot create iframes or
+ // hyperlinks to URLs with the scheme.
+ WEBKIT_API static void registerURLSchemeAsDisplayIsolated(const WebString&);
+
+ // Registers a URL scheme to not generate mixed content warnings when
+ // included by an HTTPS page.
+ WEBKIT_API static void registerURLSchemeAsSecure(const WebString&);
+
+ // Support for whitelisting access to origins beyond the same-origin policy.
+ WEBKIT_API static void addOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin, const WebString& destinationProtocol,
+ const WebString& destinationHost, bool allowDestinationSubdomains);
+ WEBKIT_API static void removeOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin, const WebString& destinationProtocol,
+ const WebString& destinationHost, bool allowDestinationSubdomains);
+ WEBKIT_API static void resetOriginAccessWhitelists();
+
+ // Returns whether the url should be allowed to see the referrer
+ // based on their respective protocols.
+ WEBKIT_API static bool shouldHideReferrer(const WebURL& url, const WebString& referrer);
+
+private:
+ WebSecurityPolicy();
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSelectElement.h b/Source/WebKit/chromium/public/WebSelectElement.h
new file mode 100644
index 0000000..97d3a78
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSelectElement.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2010 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 WebSelectElement_h
+#define WebSelectElement_h
+
+#include "WebFormControlElement.h"
+#include "WebOptionElement.h"
+#include "WebVector.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLSelectElement; }
+#endif
+
+namespace WebKit {
+
+// Provides readonly access to some properties of a DOM select element node.
+class WebSelectElement : public WebFormControlElement {
+public:
+ WebSelectElement() : WebFormControlElement() { }
+ WebSelectElement(const WebSelectElement& element) : WebFormControlElement(element) { }
+
+ WebSelectElement& operator=(const WebSelectElement& element)
+ {
+ WebFormControlElement::assign(element);
+ return *this;
+ }
+ void assign(const WebSelectElement& element) { WebFormControlElement::assign(element); }
+
+ WEBKIT_API void setValue(const WebString&);
+ WEBKIT_API WebString value();
+ WEBKIT_API WebVector<WebElement> listItems();
+
+#if WEBKIT_IMPLEMENTATION
+ WebSelectElement(const WTF::PassRefPtr<WebCore::HTMLSelectElement>&);
+ WebSelectElement& operator=(const WTF::PassRefPtr<WebCore::HTMLSelectElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLSelectElement>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSerializedScriptValue.h b/Source/WebKit/chromium/public/WebSerializedScriptValue.h
new file mode 100644
index 0000000..96e6d5b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSerializedScriptValue.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2010 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 WebSerializedScriptValue_h
+#define WebSerializedScriptValue_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class SerializedScriptValue; }
+
+namespace WebKit {
+class WebString;
+
+class WebSerializedScriptValue {
+public:
+ ~WebSerializedScriptValue() { reset(); }
+
+ WebSerializedScriptValue() { }
+ WebSerializedScriptValue(const WebSerializedScriptValue& d) { assign(d); }
+ WebSerializedScriptValue& operator=(const WebSerializedScriptValue& d)
+ {
+ assign(d);
+ return *this;
+ }
+
+ WEBKIT_API static WebSerializedScriptValue fromString(const WebString&);
+
+ // Create a WebSerializedScriptValue that represents a serialization error.
+ WEBKIT_API static WebSerializedScriptValue createInvalid();
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebSerializedScriptValue&);
+
+ bool isNull() const { return m_private.isNull(); }
+
+ // Returns a string representation of the WebSerializedScriptValue.
+ WEBKIT_API WebString toString() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebSerializedScriptValue(const WTF::PassRefPtr<WebCore::SerializedScriptValue>&);
+ WebSerializedScriptValue& operator=(const WTF::PassRefPtr<WebCore::SerializedScriptValue>&);
+ operator WTF::PassRefPtr<WebCore::SerializedScriptValue>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::SerializedScriptValue> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSettings.h b/Source/WebKit/chromium/public/WebSettings.h
new file mode 100644
index 0000000..ccff28b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSettings.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2009 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 WebSettings_h
+#define WebSettings_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebString;
+class WebURL;
+
+// WebSettings is owned by the WebView and allows code to modify the settings for
+// the WebView's page without any knowledge of WebCore itself. For the most part,
+// these functions have a 1:1 mapping with the methods in WebCore/page/Settings.h.
+class WebSettings {
+public:
+ enum EditingBehavior {
+ EditingBehaviorMac,
+ EditingBehaviorWin,
+ EditingBehaviorUnix
+ };
+
+ virtual void setStandardFontFamily(const WebString&) = 0;
+ virtual void setFixedFontFamily(const WebString&) = 0;
+ virtual void setSerifFontFamily(const WebString&) = 0;
+ virtual void setSansSerifFontFamily(const WebString&) = 0;
+ virtual void setCursiveFontFamily(const WebString&) = 0;
+ virtual void setFantasyFontFamily(const WebString&) = 0;
+ virtual void setDefaultFontSize(int) = 0;
+ virtual void setDefaultFixedFontSize(int) = 0;
+ virtual void setMinimumFontSize(int) = 0;
+ virtual void setMinimumLogicalFontSize(int) = 0;
+ virtual void setDefaultTextEncodingName(const WebString&) = 0;
+ virtual void setJavaScriptEnabled(bool) = 0;
+ virtual void setWebSecurityEnabled(bool) = 0;
+ virtual void setJavaScriptCanOpenWindowsAutomatically(bool) = 0;
+ virtual void setLoadsImagesAutomatically(bool) = 0;
+ virtual void setImagesEnabled(bool) = 0;
+ virtual void setPluginsEnabled(bool) = 0;
+ virtual void setDOMPasteAllowed(bool) = 0;
+ virtual void setDeveloperExtrasEnabled(bool) = 0;
+ virtual void setNeedsSiteSpecificQuirks(bool) = 0;
+ virtual void setShrinksStandaloneImagesToFit(bool) = 0;
+ virtual void setUsesEncodingDetector(bool) = 0;
+ virtual void setTextAreasAreResizable(bool) = 0;
+ virtual void setJavaEnabled(bool) = 0;
+ virtual void setAllowScriptsToCloseWindows(bool) = 0;
+ virtual void setUserStyleSheetLocation(const WebURL&) = 0;
+ virtual void setAuthorAndUserStylesEnabled(bool) = 0;
+ virtual void setUsesPageCache(bool) = 0;
+ virtual void setDownloadableBinaryFontsEnabled(bool) = 0;
+ virtual void setJavaScriptCanAccessClipboard(bool) = 0;
+ virtual void setXSSAuditorEnabled(bool) = 0;
+ virtual void setLocalStorageEnabled(bool) = 0;
+ virtual void setEditableLinkBehaviorNeverLive() = 0;
+ virtual void setFrameFlatteningEnabled(bool) = 0;
+ virtual void setFontRenderingModeNormal() = 0;
+ virtual void setShouldPaintCustomScrollbars(bool) = 0;
+ virtual void setAllowUniversalAccessFromFileURLs(bool) = 0;
+ virtual void setAllowFileAccessFromFileURLs(bool) = 0;
+ virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded() = 0;
+ virtual void setOfflineWebApplicationCacheEnabled(bool) = 0;
+ virtual void setExperimentalWebGLEnabled(bool) = 0;
+ virtual void setShowDebugBorders(bool) = 0;
+ virtual void setEditingBehavior(EditingBehavior) = 0;
+ virtual void setAcceleratedCompositingEnabled(bool) = 0;
+ virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool) = 0;
+ virtual void setAcceleratedCompositingForVideoEnabled(bool) = 0;
+ virtual void setAcceleratedCompositingForCanvasEnabled(bool) = 0;
+ virtual void setAcceleratedCompositingForPluginsEnabled(bool) = 0;
+ virtual void setAcceleratedCompositingForAnimationEnabled(bool) = 0;
+ virtual void setAccelerated2dCanvasEnabled(bool) = 0;
+ virtual void setMemoryInfoEnabled(bool) = 0;
+ virtual void setHyperlinkAuditingEnabled(bool) = 0;
+ virtual void setCaretBrowsingEnabled(bool) = 0;
+ virtual void setInteractiveFormValidationEnabled(bool) = 0;
+
+protected:
+ ~WebSettings() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSharedWorker.h b/Source/WebKit/chromium/public/WebSharedWorker.h
new file mode 100644
index 0000000..9492a4f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSharedWorker.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2009 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 WebSharedWorker_h
+#define WebSharedWorker_h
+
+#include "WebCommon.h"
+
+namespace WebCore {
+class ScriptExecutionContext;
+}
+
+namespace WebKit {
+
+class WebString;
+class WebMessagePortChannel;
+class WebCommonWorkerClient;
+class WebURL;
+
+// This is the interface to a SharedWorker thread.
+// Since SharedWorkers communicate entirely through MessagePorts this interface only contains APIs for starting up a SharedWorker.
+class WebSharedWorker {
+public:
+ // Invoked from the worker thread to instantiate a WebSharedWorker that interacts with the WebKit worker components.
+ WEBKIT_API static WebSharedWorker* create(WebCommonWorkerClient*);
+
+ virtual ~WebSharedWorker() {};
+
+ // Returns false if the thread hasn't been started yet (script loading has not taken place).
+ // FIXME(atwilson): Remove this when we move the initial script loading into the worker process.
+ virtual bool isStarted() = 0;
+
+ virtual void startWorkerContext(const WebURL& scriptURL,
+ const WebString& name,
+ const WebString& userAgent,
+ const WebString& sourceCode,
+ long long scriptResourceAppCacheID) = 0;
+
+ class ConnectListener {
+ public:
+ // Invoked once the connect event has been sent so the caller can free this object.
+ virtual void connected() = 0;
+ };
+
+ // Sends a connect event to the SharedWorker context. The listener is invoked when this async operation completes.
+ virtual void connect(WebMessagePortChannel*, ConnectListener*) = 0;
+
+ // Invoked to shutdown the worker when there are no more associated documents.
+ virtual void terminateWorkerContext() = 0;
+
+ // Notification when the WebCommonWorkerClient is destroyed.
+ virtual void clientDestroyed() = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSharedWorkerRepository.h b/Source/WebKit/chromium/public/WebSharedWorkerRepository.h
new file mode 100644
index 0000000..9fe6890
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSharedWorkerRepository.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 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 WebSharedWorkerRepository_h
+#define WebSharedWorkerRepository_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebString;
+class WebSharedWorker;
+class WebURL;
+
+class WebSharedWorkerRepository {
+public:
+ // Unique identifier for the parent document of a worker (unique within a given process).
+ typedef unsigned long long DocumentID;
+
+ // Tracks a newly-created SharedWorker via the repository.
+ virtual void addSharedWorker(WebSharedWorker*, DocumentID) = 0;
+
+ // Invoked when a document has been detached. DocumentID can be re-used after documentDetached() is invoked.
+ virtual void documentDetached(DocumentID) = 0;
+
+ // Returns true if the passed document is associated with any SharedWorkers.
+ virtual bool hasSharedWorkers(DocumentID) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebSharedWorkerRepository_h
diff --git a/Source/WebKit/chromium/public/WebSize.h b/Source/WebKit/chromium/public/WebSize.h
new file mode 100644
index 0000000..a7159b2
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSize.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2009 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 WebSize_h
+#define WebSize_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "IntSize.h"
+#else
+#include <gfx/size.h>
+#endif
+
+namespace WebKit {
+
+struct WebSize {
+ int width;
+ int height;
+
+ bool isEmpty() const { return width <= 0 || height <= 0; }
+
+ WebSize()
+ : width(0)
+ , height(0)
+ {
+ }
+
+ WebSize(int width, int height)
+ : width(width)
+ , height(height)
+ {
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebSize(const WebCore::IntSize& s)
+ : width(s.width())
+ , height(s.height())
+ {
+ }
+
+ WebSize& operator=(const WebCore::IntSize& s)
+ {
+ width = s.width();
+ height = s.height();
+ return *this;
+ }
+
+ operator WebCore::IntSize() const
+ {
+ return WebCore::IntSize(width, height);
+ }
+#else
+ WebSize(const gfx::Size& s)
+ : width(s.width())
+ , height(s.height())
+ {
+ }
+
+ WebSize& operator=(const gfx::Size& s)
+ {
+ width = s.width();
+ height = s.height();
+ return *this;
+ }
+
+ operator gfx::Size() const
+ {
+ return gfx::Size(width, height);
+ }
+#endif
+};
+
+inline bool operator==(const WebSize& a, const WebSize& b)
+{
+ return a.width == b.width && a.height == b.height;
+}
+
+inline bool operator!=(const WebSize& a, const WebSize& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSocketStreamError.h b/Source/WebKit/chromium/public/WebSocketStreamError.h
new file mode 100644
index 0000000..f52869b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSocketStreamError.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2009 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 WebSocketStreamError_h
+#define WebSocketStreamError_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebSocketStreamError {
+public:
+ // FIXME: Define SocketStream Error codes and accessor methods.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSocketStreamHandle.h b/Source/WebKit/chromium/public/WebSocketStreamHandle.h
new file mode 100644
index 0000000..ededa0e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSocketStreamHandle.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009 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 WebSocketStreamHandle_h
+#define WebSocketStreamHandle_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebData;
+class WebSocketStreamHandleClient;
+class WebURL;
+
+class WebSocketStreamHandle {
+public:
+ virtual ~WebSocketStreamHandle() { }
+
+ // Connect new socket stream asynchronously.
+ virtual void connect(const WebURL&, WebSocketStreamHandleClient*) = 0;
+
+ // Send web socket frame data on the socket stream.
+ virtual bool send(const WebData&) = 0;
+
+ // Close the socket stream.
+ virtual void close() = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSocketStreamHandleClient.h b/Source/WebKit/chromium/public/WebSocketStreamHandleClient.h
new file mode 100644
index 0000000..82f328c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSocketStreamHandleClient.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2009 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 WebSocketStreamHandleClient_h
+#define WebSocketStreamHandleClient_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebData;
+class WebSocketStreamError;
+class WebSocketStreamHandle;
+class WebURL;
+
+class WebSocketStreamHandleClient {
+public:
+
+ // Called when Socket Stream is opened.
+ virtual void didOpenStream(WebSocketStreamHandle*, int /* maxPendingSendAllowed */) = 0;
+
+ // Called when |amountSent| bytes are sent.
+ virtual void didSendData(WebSocketStreamHandle*, int /* amountSent */) = 0;
+
+ // Called when data are received.
+ virtual void didReceiveData(WebSocketStreamHandle*, const WebData&) = 0;
+
+ // Called when Socket Stream is closed.
+ virtual void didClose(WebSocketStreamHandle*) = 0;
+
+ // Called when Socket Stream has an error.
+ virtual void didFail(WebSocketStreamHandle*, const WebSocketStreamError&) = 0;
+
+ // FIXME: auth challenge for proxy
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSpeechInputController.h b/Source/WebKit/chromium/public/WebSpeechInputController.h
new file mode 100644
index 0000000..6ed546f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechInputController.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 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 WebSpeechInputController_h
+#define WebSpeechInputController_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebString;
+struct WebRect;
+class WebString;
+
+// Provides an embedder API called by WebKit.
+class WebSpeechInputController {
+public:
+ // Starts speech recognition. Speech will get recorded until the endpointer detects silence,
+ // runs to the limit or stopRecording is called. Progress indications and the recognized
+ // text are returned via the listener interface.
+ virtual bool startRecognition(int requestId, const WebRect& elementRect, const WebString& language, const WebString& grammar)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return false;
+ }
+
+ // Cancels an ongoing recognition and discards any audio recorded so far. No partial
+ // recognition results are returned to the listener.
+ virtual void cancelRecognition(int) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Stops audio recording and performs recognition with the audio recorded until now
+ // (does not discard audio). This is an optional call and is typically invoked if the user
+ // wants to stop recording audio as soon as they finished speaking. Otherwise, the speech
+ // recording 'endpointer' should detect silence in the input and stop recording automatically.
+ // Call startRecognition() to record audio and recognize speech again.
+ virtual void stopRecording(int) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ virtual ~WebSpeechInputController() { }
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechInputController_h
diff --git a/Source/WebKit/chromium/public/WebSpeechInputControllerMock.h b/Source/WebKit/chromium/public/WebSpeechInputControllerMock.h
new file mode 100644
index 0000000..e440b89
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechInputControllerMock.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 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 WebSpeechInputControllerMock_h
+#define WebSpeechInputControllerMock_h
+
+#include "WebSpeechInputController.h"
+
+namespace WebKit {
+
+class WebString;
+class WebSpeechInputListener;
+
+class WebSpeechInputControllerMock : public WebSpeechInputController {
+public:
+ WEBKIT_API static WebSpeechInputControllerMock* create(
+ WebSpeechInputListener* listener);
+ virtual ~WebSpeechInputControllerMock() { }
+
+ virtual void addMockRecognitionResult(const WebString& result, double confidence, const WebString& language) = 0;
+
+ virtual void clearResults() = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebSpeechInputListener.h b/Source/WebKit/chromium/public/WebSpeechInputListener.h
new file mode 100644
index 0000000..091f984
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechInputListener.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 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 WebSpeechInputListener_h
+#define WebSpeechInputListener_h
+
+#include "WebSpeechInputResult.h"
+
+namespace WebKit {
+
+class WebString;
+
+// Provides a WebKit API called by the embedder.
+// A typical sequence of calls to the listener would be
+// 1 call to didCompleteRecording
+// 0 or more calls to setRecognitionResult
+// 1 call to didCompleteRecognition
+class WebSpeechInputListener {
+public:
+ // Informs that audio recording has completed and recognition is underway. This gets invoked
+ // irrespective of whether recording was stopped automatically by the 'endpointer' or if
+ // WebSpeechInputController::stopRecording() was called.
+ // Typically after this call the listener would update the UI to reflect that recognition is
+ // in progress.
+ virtual void didCompleteRecording(int) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Gives results from speech recognition, either partial or the final results.
+ // This method can potentially get called multiple times if there are partial results
+ // available as the user keeps speaking. If the speech could not be recognized properly
+ // or if there was any other errors in the process, this method may never be called.
+ virtual void setRecognitionResult(int, const WebSpeechInputResultArray&) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Informs that speech recognition has completed. This gets invoked irrespective of whether
+ // recognition was succesful or not, whether setRecognitionResult() was invoked or not. The
+ // handler typically frees up any temporary resources allocated and waits for the next speech
+ // recognition request.
+ virtual void didCompleteRecognition(int) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ ~WebSpeechInputListener() { }
+};
+
+} // namespace WebKit
+
+#endif // WebSpeechInputListener_h
diff --git a/Source/WebKit/chromium/public/WebSpeechInputResult.h b/Source/WebKit/chromium/public/WebSpeechInputResult.h
new file mode 100644
index 0000000..8f1a8f5
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebSpeechInputResult.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 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 WebSpeechInputResult_h
+#define WebSpeechInputResult_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+namespace WebCore {
+class SpeechInputResult;
+}
+
+namespace WebKit {
+
+// This class holds one speech recognition result including the text and other related
+// fields, as received from the embedder.
+class WebSpeechInputResult {
+public:
+ WebSpeechInputResult() { }
+ ~WebSpeechInputResult() { reset(); }
+
+ WEBKIT_API void set(const WebString& utterance, double confidence);
+ WEBKIT_API void reset();
+
+#if WEBKIT_IMPLEMENTATION
+ WebSpeechInputResult(const WTF::PassRefPtr<WebCore::SpeechInputResult>&);
+ operator WTF::PassRefPtr<WebCore::SpeechInputResult>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::SpeechInputResult> m_private;
+};
+
+typedef WebVector<WebSpeechInputResult> WebSpeechInputResultArray;
+
+} // namespace WebKit
+
+#endif // WebSpeechInputResult_h
diff --git a/Source/WebKit/chromium/public/WebStorageArea.h b/Source/WebKit/chromium/public/WebStorageArea.h
new file mode 100644
index 0000000..86f708c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebStorageArea.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2009 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 WebStorageArea_h
+#define WebStorageArea_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebFrame;
+class WebURL;
+
+// In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This
+// class wraps a StorageArea. All the methods have obvious connections to the spec:
+// http://dev.w3.org/html5/webstorage/
+class WebStorageArea {
+public:
+ virtual ~WebStorageArea() { }
+
+ enum Result {
+ ResultOK = 0,
+ ResultBlockedByQuota,
+ ResultBlockedByPolicy
+ };
+
+ // The number of key/value pairs in the storage area.
+ virtual unsigned length() = 0;
+
+ // Get a value for a specific key. Valid key indices are 0 through length() - 1.
+ // Indexes may change on any set/removeItem call. Will return null if the index
+ // provided is out of range.
+ virtual WebString key(unsigned index) = 0;
+
+ // Get the value that corresponds to a specific key. This returns null if there is
+ // no entry for that key.
+ virtual WebString getItem(const WebString& key) = 0;
+
+ // Set the value that corresponds to a specific key. Result will either be ResultOK
+ // or some particular error. The value is NOT set when there's an error. url is the
+ // url that should be used if a storage event fires.
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue, WebFrame*)
+ {
+ setItem(key, newValue, url, result, oldValue);
+ }
+ // FIXME: Remove soon (once Chrome has rolled past this revision).
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue)
+ {
+ setItem(key, newValue, url, result, oldValue, 0);
+ }
+
+ // Remove the value associated with a particular key. url is the url that should be used
+ // if a storage event fires.
+ virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue) = 0;
+
+ // Clear all key/value pairs. url is the url that should be used if a storage event fires.
+ virtual void clear(const WebURL& url, bool& somethingCleared) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebStorageArea_h
diff --git a/Source/WebKit/chromium/public/WebStorageEventDispatcher.h b/Source/WebKit/chromium/public/WebStorageEventDispatcher.h
new file mode 100644
index 0000000..37ceb7c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebStorageEventDispatcher.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 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 WebStorageEventDispatcher_h
+#define WebStorageEventDispatcher_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebURL;
+
+// This is used to dispatch storage events to all pages.
+// FIXME: Make this (or something) work for SessionStorage!
+class WebStorageEventDispatcher {
+public:
+ WEBKIT_API static WebStorageEventDispatcher* create();
+
+ virtual ~WebStorageEventDispatcher() { }
+
+ // Dispatch the actual event. Doesn't yet work for SessionStorage.
+ virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
+ const WebString& newValue, const WebString& origin,
+ const WebURL& url, bool isLocalStorage) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebStorageEventDispatcher_h
diff --git a/Source/WebKit/chromium/public/WebStorageNamespace.h b/Source/WebKit/chromium/public/WebStorageNamespace.h
new file mode 100644
index 0000000..51d4e0b
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebStorageNamespace.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2009 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 WebStorageNamespace_h
+#define WebStorageNamespace_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebStorageArea;
+class WebString;
+
+// WebStorageNamespace represents a collection of StorageAreas. Typically, you'll have
+// multiple StorageNamespaces to represent the SessionStorage for each tab and a single
+// StorageNamespace to represent LocalStorage for the entire browser.
+class WebStorageNamespace {
+public:
+ // Create a new WebStorageNamespace. LocalStorageNamespaces require a path to specify
+ // where the SQLite databases that make LocalStorage data persistent are located.
+ // If path is empty, data will not persist. You should call delete on the returned
+ // object when you're finished.
+ WEBKIT_API static WebStorageNamespace* createLocalStorageNamespace(const WebString& backingDirectoryPath, unsigned quota);
+ WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace(unsigned quota);
+
+ // The quota for each storage area. Suggested by the spec.
+ static const unsigned m_localStorageQuota = 5 * 1024 * 1024;
+
+ // Since SessionStorage memory is allocated in the browser process, we place a
+ // per-origin quota on it. Like LocalStorage there are known attacks against
+ // this, so it's more of a sanity check than a real security measure.
+ static const unsigned m_sessionStorageQuota = 5 * 1024 * 1024;
+
+ static const unsigned noQuota = UINT_MAX;
+
+ virtual ~WebStorageNamespace() { }
+
+ // Create a new WebStorageArea object. Two subsequent calls with the same origin
+ // will return two different WebStorageArea objects that share the same backing store.
+ // You should call delete on the returned object when you're finished.
+ virtual WebStorageArea* createStorageArea(const WebString& origin) = 0;
+
+ // Copy a StorageNamespace. This only makes sense in the case of SessionStorage.
+ virtual WebStorageNamespace* copy() = 0;
+
+ // Shutdown the StorageNamespace. Write all StorageArea's to disk and disallow new
+ // write activity.
+ virtual void close() = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebStorageNamespace_h
diff --git a/Source/WebKit/chromium/public/WebString.h b/Source/WebKit/chromium/public/WebString.h
new file mode 100644
index 0000000..4d5e502
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebString.h
@@ -0,0 +1,177 @@
+/*
+ * Copyright (C) 2009 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 WebString_h
+#define WebString_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/Forward.h>
+#else
+#include <base/nullable_string16.h>
+#include <base/string16.h>
+#endif
+
+namespace WebKit {
+
+class WebCString;
+class WebStringPrivate;
+
+// A UTF-16 string container. It is inexpensive to copy a WebString
+// object.
+//
+// WARNING: It is not safe to pass a WebString across threads!!!
+//
+class WebString {
+public:
+ ~WebString() { reset(); }
+
+ WebString() : m_private(0) { }
+
+ WebString(const WebUChar* data, size_t len) : m_private(0)
+ {
+ assign(data, len);
+ }
+
+ WebString(const WebString& s) : m_private(0) { assign(s); }
+
+ WebString& operator=(const WebString& s)
+ {
+ assign(s);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebString&);
+ WEBKIT_API void assign(const WebUChar* data, size_t len);
+
+ WEBKIT_API bool equals(const WebString& s) const;
+
+ WEBKIT_API size_t length() const;
+ WEBKIT_API const WebUChar* data() const;
+
+ bool isEmpty() const { return !length(); }
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebCString utf8() const;
+
+ WEBKIT_API static WebString fromUTF8(const char* data, size_t length);
+ WEBKIT_API static WebString fromUTF8(const char* data);
+
+ template <int N> WebString(const char (&data)[N])
+ : m_private(0)
+ {
+ assign(fromUTF8(data, N - 1));
+ }
+
+ template <int N> WebString& operator=(const char (&data)[N])
+ {
+ assign(fromUTF8(data, N - 1));
+ return *this;
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebString(const WTF::String&);
+ WebString& operator=(const WTF::String&);
+ operator WTF::String() const;
+
+ WebString(const WTF::AtomicString&);
+ WebString& operator=(const WTF::AtomicString&);
+ operator WTF::AtomicString() const;
+#else
+
+ WebString(const string16& s) : m_private(0)
+ {
+ assign(s.data(), s.length());
+ }
+
+ WebString& operator=(const string16& s)
+ {
+ assign(s.data(), s.length());
+ return *this;
+ }
+
+ operator string16() const
+ {
+ size_t len = length();
+ return len ? string16(data(), len) : string16();
+ }
+
+ WebString(const NullableString16& s) : m_private(0)
+ {
+ if (s.is_null())
+ reset();
+ else
+ assign(s.string().data(), s.string().length());
+ }
+
+ WebString& operator=(const NullableString16& s)
+ {
+ if (s.is_null())
+ reset();
+ else
+ assign(s.string().data(), s.string().length());
+ return *this;
+ }
+
+ operator NullableString16() const
+ {
+ if (!m_private)
+ return NullableString16(string16(), true);
+ size_t len = length();
+ return NullableString16(len ? string16(data(), len) : string16(), false);
+ }
+
+ template <class UTF8String>
+ static WebString fromUTF8(const UTF8String& s)
+ {
+ return fromUTF8(s.data(), s.length());
+ }
+#endif
+
+private:
+ void assign(WebStringPrivate*);
+ WebStringPrivate* m_private;
+};
+
+inline bool operator==(const WebString& a, const WebString& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebString& a, const WebString& b)
+{
+ return !(a == b);
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebTextAffinity.h b/Source/WebKit/chromium/public/WebTextAffinity.h
new file mode 100644
index 0000000..1224f61
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebTextAffinity.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2009 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 WebTextAffinity_h
+#define WebTextAffinity_h
+
+namespace WebKit {
+
+// These constants specify the preferred direction of selection.
+enum WebTextAffinity {
+ WebTextAffinityUpstream, // The selection is moving toward the top of the document.
+ WebTextAffinityDownstream, // The selection is moving toward the bottom of the document.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebTextCaseSensitivity.h b/Source/WebKit/chromium/public/WebTextCaseSensitivity.h
new file mode 100644
index 0000000..ae5860c
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebTextCaseSensitivity.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2009 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 WebTextCaseSensitivity_h
+#define WebTextCaseSensitivity_h
+
+namespace WebKit {
+
+// These constants specify the preferred case sensitivity.
+enum WebTextCaseSensitivity {
+ WebTextCaseSensitive, // String matching is case-sensitive.
+ WebTextCaseInsensitive, // String matching is case-insensitive.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebTextDirection.h b/Source/WebKit/chromium/public/WebTextDirection.h
new file mode 100644
index 0000000..3d51296
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebTextDirection.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2009 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 WebTextDirection_h
+#define WebTextDirection_h
+
+namespace WebKit {
+
+// Represents text directions (or writing directions) of a DOM node.
+enum WebTextDirection {
+ WebTextDirectionDefault, // Natural writing direction ("inherit")
+ WebTextDirectionLeftToRight,
+ WebTextDirectionRightToLeft,
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebTextInputType.h b/Source/WebKit/chromium/public/WebTextInputType.h
new file mode 100644
index 0000000..2592f6f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebTextInputType.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 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 WebTextInputType_h
+#define WebTextInputType_h
+
+namespace WebKit {
+
+enum WebTextInputType {
+ // Input caret is not in an editable node, no input method shall be used.
+ WebTextInputTypeNone,
+
+ // Input caret is in a normal editable node, any input method can be used.
+ WebTextInputTypeText,
+
+ // Input caret is in a password box, an input method may be used only if
+ // it's suitable for password input.
+ WebTextInputTypePassword,
+
+ // FIXME: Add more text input types when necessary, eg. Number,
+ // Date, Email, URL, etc.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebTextRun.h b/Source/WebKit/chromium/public/WebTextRun.h
new file mode 100644
index 0000000..cb1373a
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebTextRun.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 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 WebTextRun_h
+#define WebTextRun_h
+
+#include "WebString.h"
+
+#ifdef WEBKIT_IMPLEMENTATION
+namespace WebCore { class TextRun; }
+#endif
+
+namespace WebKit {
+
+struct WebTextRun {
+ WebTextRun(const WebString& t, bool isRTL, bool hasDirectionalOverride)
+ : text(t)
+ , rtl(isRTL)
+ , directionalOverride(hasDirectionalOverride)
+ {
+ }
+ WebTextRun()
+ : rtl(false)
+ , directionalOverride(false)
+ {
+ }
+
+ WebString text;
+ bool rtl;
+ bool directionalOverride;
+
+#ifdef WEBKIT_IMPLEMENTATION
+ // The resulting WebCore::TextRun will refer to the text in this
+ // struct, so "this" must outlive the WebCore text run.
+ operator WebCore::TextRun() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebThreadSafeData.h b/Source/WebKit/chromium/public/WebThreadSafeData.h
new file mode 100755
index 0000000..a000b39
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebThreadSafeData.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2010 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 WebThreadSafeData_h
+#define WebThreadSafeData_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+#if !WEBKIT_IMPLEMENTATION
+#include <string>
+#endif
+
+namespace WebCore { class RawData; }
+
+namespace WebKit {
+
+// A container for raw bytes. It is inexpensive to copy a WebThreadSafeData object.
+// It is safe to pass a WebThreadSafeData across threads!!!
+class WebThreadSafeData {
+public:
+ WebThreadSafeData() { }
+ ~WebThreadSafeData() { reset(); }
+
+ WEBKIT_API void assign(const WebThreadSafeData&);
+ WEBKIT_API void reset();
+
+ WEBKIT_API size_t size() const;
+ WEBKIT_API const char* data() const;
+
+ bool isEmpty() const { return !size(); }
+
+#if WEBKIT_IMPLEMENTATION
+ WebThreadSafeData(const WTF::PassRefPtr<WebCore::RawData>&);
+ WebThreadSafeData& operator=(const WTF::PassRefPtr<WebCore::RawData>&);
+#else
+ operator std::string() const
+ {
+ size_t len = size();
+ return len ? std::string(data(), len) : std::string();
+ }
+#endif
+
+private:
+ WebPrivatePtr<WebCore::RawData> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebTouchPoint.h b/Source/WebKit/chromium/public/WebTouchPoint.h
new file mode 100644
index 0000000..ddfa26f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebTouchPoint.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 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 WebTouchPoint_h
+#define WebTouchPoint_h
+
+#include "WebCommon.h"
+#include "WebPoint.h"
+
+namespace WebKit {
+
+class WebTouchPoint {
+public:
+ WebTouchPoint()
+ : id(0)
+ , state(StateUndefined) { }
+
+ enum State {
+ StateUndefined,
+ StateReleased,
+ StatePressed,
+ StateMoved,
+ StateStationary,
+ StateCancelled,
+ };
+
+ int id;
+ State state;
+ WebPoint screenPosition;
+ WebPoint position;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebURL.h b/Source/WebKit/chromium/public/WebURL.h
new file mode 100644
index 0000000..bb90e32
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebURL.h
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2009 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 WebURL_h
+#define WebURL_h
+
+#include "WebCString.h"
+#include <googleurl/src/url_parse.h>
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class KURL; }
+#else
+#include <googleurl/src/gurl.h>
+#endif
+
+namespace WebKit {
+
+class WebURL {
+public:
+ ~WebURL()
+ {
+ }
+
+ WebURL() : m_isValid(false)
+ {
+ }
+
+ WebURL(const WebCString& spec, const url_parse::Parsed& parsed, bool isValid)
+ : m_spec(spec)
+ , m_parsed(parsed)
+ , m_isValid(isValid)
+ {
+ }
+
+ WebURL(const WebURL& s)
+ : m_spec(s.m_spec)
+ , m_parsed(s.m_parsed)
+ , m_isValid(s.m_isValid)
+ {
+ }
+
+ WebURL& operator=(const WebURL& s)
+ {
+ m_spec = s.m_spec;
+ m_parsed = s.m_parsed;
+ m_isValid = s.m_isValid;
+ return *this;
+ }
+
+ void assign(const WebCString& spec, const url_parse::Parsed& parsed, bool isValid)
+ {
+ m_spec = spec;
+ m_parsed = parsed;
+ m_isValid = isValid;
+ }
+
+ const WebCString& spec() const
+ {
+ return m_spec;
+ }
+
+ const url_parse::Parsed& parsed() const
+ {
+ return m_parsed;
+ }
+
+ bool isValid() const
+ {
+ return m_isValid;
+ }
+
+ bool isEmpty() const
+ {
+ return m_spec.isEmpty();
+ }
+
+ bool isNull() const
+ {
+ return m_spec.isEmpty();
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebURL(const WebCore::KURL&);
+ WebURL& operator=(const WebCore::KURL&);
+ operator WebCore::KURL() const;
+#else
+ WebURL(const GURL& g)
+ : m_spec(g.possibly_invalid_spec())
+ , m_parsed(g.parsed_for_possibly_invalid_spec())
+ , m_isValid(g.is_valid())
+ {
+ }
+
+ WebURL& operator=(const GURL& g)
+ {
+ m_spec = g.possibly_invalid_spec();
+ m_parsed = g.parsed_for_possibly_invalid_spec();
+ m_isValid = g.is_valid();
+ return *this;
+ }
+
+ operator GURL() const
+ {
+ return isNull() ? GURL() : GURL(m_spec.data(), m_spec.length(), m_parsed, m_isValid);
+ }
+#endif
+
+private:
+ WebCString m_spec; // UTF-8 encoded
+ url_parse::Parsed m_parsed;
+ bool m_isValid;
+};
+
+inline bool operator<(const WebURL& a, const WebURL& b)
+{
+ return a.spec() < b.spec();
+}
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebURLError.h b/Source/WebKit/chromium/public/WebURLError.h
new file mode 100644
index 0000000..de88e3e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebURLError.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009 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 WebURLError_h
+#define WebURLError_h
+
+#include "WebString.h"
+#include "WebURL.h"
+
+#if defined(WEBKIT_IMPLEMENTATION)
+namespace WebCore { class ResourceError; }
+#endif
+
+namespace WebKit {
+
+struct WebURLError {
+ // A namespace for "reason" to support various layers generating
+ // resource errors. WebKit does not care about the value of this
+ // string as it will just be passed via callbacks to the consumer.
+ WebString domain;
+
+ // A numeric error code detailing the reason for this error. A value
+ // of 0 means no error. WebKit does not interpret the meaning of other
+ // values and normally just forwards this error information back to the
+ // embedder (see for example WebFrameClient).
+ int reason;
+
+ // The url that failed to load.
+ WebURL unreachableURL;
+
+ WebURLError() : reason(0) { }
+
+#if defined(WEBKIT_IMPLEMENTATION)
+ WebURLError(const WebCore::ResourceError&);
+ WebURLError& operator=(const WebCore::ResourceError&);
+ operator WebCore::ResourceError() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebURLLoadTiming.h b/Source/WebKit/chromium/public/WebURLLoadTiming.h
new file mode 100644
index 0000000..9412d14
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebURLLoadTiming.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2010 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 WebURLLoadTiming_h
+#define WebURLLoadTiming_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class ResourceLoadTiming; }
+
+namespace WebKit {
+class WebString;
+
+class WebURLLoadTiming {
+public:
+ ~WebURLLoadTiming() { reset(); }
+
+ WebURLLoadTiming() { }
+ WebURLLoadTiming(const WebURLLoadTiming& d) { assign(d); }
+ WebURLLoadTiming& operator=(const WebURLLoadTiming& d)
+ {
+ assign(d);
+ return *this;
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebURLLoadTiming&);
+
+ bool isNull() const { return m_private.isNull(); }
+
+ WEBKIT_API double requestTime() const;
+ WEBKIT_API void setRequestTime(double time);
+
+ WEBKIT_API int proxyStart() const;
+ WEBKIT_API void setProxyStart(int start);
+
+ WEBKIT_API int proxyEnd() const;
+ WEBKIT_API void setProxyEnd(int end);
+
+ WEBKIT_API int dnsStart() const;
+ WEBKIT_API void setDNSStart(int start);
+
+ WEBKIT_API int dnsEnd() const;
+ WEBKIT_API void setDNSEnd(int end);
+
+ WEBKIT_API int connectStart() const;
+ WEBKIT_API void setConnectStart(int start);
+
+ WEBKIT_API int connectEnd() const;
+ WEBKIT_API void setConnectEnd(int end);
+
+ WEBKIT_API int sendStart() const;
+ WEBKIT_API void setSendStart(int start);
+
+ WEBKIT_API int sendEnd() const;
+ WEBKIT_API void setSendEnd(int end);
+
+ WEBKIT_API int receiveHeadersEnd() const;
+ WEBKIT_API void setReceiveHeadersEnd(int end);
+
+ WEBKIT_API int sslStart() const;
+ WEBKIT_API void setSSLStart(int start);
+
+ WEBKIT_API int sslEnd() const;
+ WEBKIT_API void setSSLEnd(int end);
+
+#if WEBKIT_IMPLEMENTATION
+ WebURLLoadTiming(const WTF::PassRefPtr<WebCore::ResourceLoadTiming>&);
+ WebURLLoadTiming& operator=(const WTF::PassRefPtr<WebCore::ResourceLoadTiming>&);
+ operator WTF::PassRefPtr<WebCore::ResourceLoadTiming>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::ResourceLoadTiming> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebURLLoader.h b/Source/WebKit/chromium/public/WebURLLoader.h
new file mode 100644
index 0000000..54d105e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebURLLoader.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009 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 WebURLLoader_h
+#define WebURLLoader_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebData;
+class WebURLLoaderClient;
+class WebURLRequest;
+class WebURLResponse;
+struct WebURLError;
+
+class WebURLLoader {
+public:
+ // The WebURLLoader may be deleted in a call to its client.
+ virtual ~WebURLLoader() {}
+
+ // Load the request synchronously, returning results directly to the
+ // caller upon completion. There is no mechanism to interrupt a
+ // synchronous load!!
+ virtual void loadSynchronously(const WebURLRequest&,
+ WebURLResponse&, WebURLError&, WebData& data) = 0;
+
+ // Load the request asynchronously, sending notifications to the given
+ // client. The client will receive no further notifications if the
+ // loader is disposed before it completes its work.
+ virtual void loadAsynchronously(const WebURLRequest&,
+ WebURLLoaderClient*) = 0;
+
+ // Cancels an asynchronous load. This will appear as a load error to
+ // the client.
+ virtual void cancel() = 0;
+
+ // Suspends/resumes an asynchronous load.
+ virtual void setDefersLoading(bool) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebURLLoaderClient.h b/Source/WebKit/chromium/public/WebURLLoaderClient.h
new file mode 100644
index 0000000..87d100f
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebURLLoaderClient.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2009 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 WebURLLoaderClient_h
+#define WebURLLoaderClient_h
+
+namespace WebKit {
+
+class WebURLLoader;
+class WebURLRequest;
+class WebURLResponse;
+struct WebURLError;
+
+class WebURLLoaderClient {
+public:
+ // Called when following a redirect. |newRequest| contains the request
+ // generated by the redirect. The client may modify |newRequest|.
+ virtual void willSendRequest(
+ WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse) { }
+
+ // Called to report upload progress. The bytes reported correspond to
+ // the HTTP message body.
+ virtual void didSendData(
+ WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) { }
+
+ // Called when response headers are received.
+ virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) { }
+
+ // Called when a chunk of response data is downloaded. This is only called
+ // if WebURLRequest's downloadToFile flag was set to true.
+ virtual void didDownloadData(WebURLLoader*, int dataLength) { }
+
+ // Called when a chunk of response data is received.
+ virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength) { }
+
+ // Called when a chunk of renderer-generated metadata is received from the cache.
+ virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength) { }
+
+ // Called when the load completes successfully.
+ virtual void didFinishLoading(WebURLLoader*, double finishTime) { }
+
+ // Called when the load completes with an error.
+ virtual void didFail(WebURLLoader*, const WebURLError&) { }
+
+protected:
+ ~WebURLLoaderClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebURLRequest.h b/Source/WebKit/chromium/public/WebURLRequest.h
new file mode 100644
index 0000000..7dd97ca
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebURLRequest.h
@@ -0,0 +1,180 @@
+/*
+ * Copyright (C) 2009 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 WebURLRequest_h
+#define WebURLRequest_h
+
+#include "WebCommon.h"
+#include "WebHTTPBody.h"
+
+#if defined(WEBKIT_IMPLEMENTATION)
+namespace WebCore { class ResourceRequest; }
+#endif
+
+namespace WebKit {
+
+class WebCString;
+class WebHTTPBody;
+class WebHTTPHeaderVisitor;
+class WebString;
+class WebURL;
+class WebURLRequestPrivate;
+
+class WebURLRequest {
+public:
+ enum CachePolicy {
+ UseProtocolCachePolicy, // normal load
+ ReloadIgnoringCacheData, // reload
+ ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data
+ ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache
+ };
+
+ enum TargetType {
+ TargetIsMainFrame = 0,
+ TargetIsSubframe = 1,
+ TargetIsSubresource = 2,
+ TargetIsStyleSheet = 3,
+ TargetIsScript = 4,
+ TargetIsFontResource = 5,
+ TargetIsImage = 6,
+ TargetIsObject = 7,
+ TargetIsMedia = 8,
+ TargetIsWorker = 9,
+ TargetIsSharedWorker = 10,
+ TargetIsPrefetch = 11,
+ };
+
+ ~WebURLRequest() { reset(); }
+
+ WebURLRequest() : m_private(0) { }
+ WebURLRequest(const WebURLRequest& r) : m_private(0) { assign(r); }
+ WebURLRequest& operator=(const WebURLRequest& r)
+ {
+ assign(r);
+ return *this;
+ }
+
+ explicit WebURLRequest(const WebURL& url) : m_private(0)
+ {
+ initialize();
+ setURL(url);
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebURLRequest&);
+
+ WEBKIT_API bool isNull() const;
+
+ WEBKIT_API WebURL url() const;
+ WEBKIT_API void setURL(const WebURL&);
+
+ // Used to implement third-party cookie blocking.
+ WEBKIT_API WebURL firstPartyForCookies() const;
+ WEBKIT_API void setFirstPartyForCookies(const WebURL&);
+
+ WEBKIT_API bool allowCookies() const;
+ WEBKIT_API void setAllowCookies(bool allowCookies);
+
+ // Controls whether user name, password, and cookies may be sent with the
+ // request. (If false, this overrides allowCookies.)
+ WEBKIT_API bool allowStoredCredentials() const;
+ WEBKIT_API void setAllowStoredCredentials(bool allowStoredCredentials);
+
+ WEBKIT_API CachePolicy cachePolicy() const;
+ WEBKIT_API void setCachePolicy(CachePolicy);
+
+ WEBKIT_API WebString httpMethod() const;
+ WEBKIT_API void setHTTPMethod(const WebString&);
+
+ WEBKIT_API WebString httpHeaderField(const WebString& name) const;
+ WEBKIT_API void setHTTPHeaderField(const WebString& name, const WebString& value);
+ WEBKIT_API void addHTTPHeaderField(const WebString& name, const WebString& value);
+ WEBKIT_API void clearHTTPHeaderField(const WebString& name);
+ WEBKIT_API void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
+
+ WEBKIT_API WebHTTPBody httpBody() const;
+ WEBKIT_API void setHTTPBody(const WebHTTPBody&);
+
+ // Controls whether upload progress events are generated when a request
+ // has a body.
+ WEBKIT_API bool reportUploadProgress() const;
+ WEBKIT_API void setReportUploadProgress(bool);
+
+ // Controls whether load timing info is collected for the request.
+ WEBKIT_API bool reportLoadTiming() const;
+ WEBKIT_API void setReportLoadTiming(bool);
+
+ // Controls whether actual headers sent and received for request are
+ // collected and reported.
+ WEBKIT_API bool reportRawHeaders() const;
+ WEBKIT_API void setReportRawHeaders(bool);
+
+ WEBKIT_API TargetType targetType() const;
+ WEBKIT_API void setTargetType(TargetType);
+
+ // True if the request was user initiated.
+ WEBKIT_API bool hasUserGesture() const;
+ WEBKIT_API void setHasUserGesture(bool);
+
+ // A consumer controlled value intended to be used to identify the
+ // requestor.
+ WEBKIT_API int requestorID() const;
+ WEBKIT_API void setRequestorID(int);
+
+ // A consumer controlled value intended to be used to identify the
+ // process of the requestor.
+ WEBKIT_API int requestorProcessID() const;
+ WEBKIT_API void setRequestorProcessID(int);
+
+ // Allows the request to be matched up with its app cache host.
+ WEBKIT_API int appCacheHostID() const;
+ WEBKIT_API void setAppCacheHostID(int id);
+
+ // If true, the response body will be downloaded to a file managed by the
+ // WebURLLoader. See WebURLResponse::downloadedFilePath.
+ WEBKIT_API bool downloadToFile() const;
+ WEBKIT_API void setDownloadToFile(bool);
+
+#if defined(WEBKIT_IMPLEMENTATION)
+ WebCore::ResourceRequest& toMutableResourceRequest();
+ const WebCore::ResourceRequest& toResourceRequest() const;
+#endif
+
+protected:
+ void assign(WebURLRequestPrivate*);
+
+private:
+ WebURLRequestPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebURLResponse.h b/Source/WebKit/chromium/public/WebURLResponse.h
new file mode 100644
index 0000000..c50f88e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebURLResponse.h
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 2009 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 WebURLResponse_h
+#define WebURLResponse_h
+
+#include "WebCommon.h"
+#include "WebPrivateOwnPtr.h"
+
+#if defined(WEBKIT_IMPLEMENTATION)
+namespace WebCore { class ResourceResponse; }
+#endif
+
+namespace WebKit {
+
+class WebCString;
+class WebHTTPHeaderVisitor;
+class WebHTTPLoadInfo;
+class WebString;
+class WebURL;
+class WebURLLoadTiming;
+class WebURLResponsePrivate;
+
+class WebURLResponse {
+public:
+ ~WebURLResponse() { reset(); }
+
+ WebURLResponse() : m_private(0) { }
+ WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); }
+ WebURLResponse& operator=(const WebURLResponse& r)
+ {
+ assign(r);
+ return *this;
+ }
+
+ explicit WebURLResponse(const WebURL& url) : m_private(0)
+ {
+ initialize();
+ setURL(url);
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebURLResponse&);
+
+ WEBKIT_API bool isNull() const;
+
+ WEBKIT_API WebURL url() const;
+ WEBKIT_API void setURL(const WebURL&);
+
+ WEBKIT_API unsigned connectionID() const;
+ WEBKIT_API void setConnectionID(unsigned);
+
+ WEBKIT_API bool connectionReused() const;
+ WEBKIT_API void setConnectionReused(bool);
+
+ WEBKIT_API WebURLLoadTiming loadTiming();
+ WEBKIT_API void setLoadTiming(const WebURLLoadTiming&);
+
+ WEBKIT_API WebHTTPLoadInfo httpLoadInfo();
+ WEBKIT_API void setHTTPLoadInfo(const WebHTTPLoadInfo&);
+
+ WEBKIT_API double responseTime() const;
+ WEBKIT_API void setResponseTime(double);
+
+ WEBKIT_API WebString mimeType() const;
+ WEBKIT_API void setMIMEType(const WebString&);
+
+ WEBKIT_API long long expectedContentLength() const;
+ WEBKIT_API void setExpectedContentLength(long long);
+
+ WEBKIT_API WebString textEncodingName() const;
+ WEBKIT_API void setTextEncodingName(const WebString&);
+
+ WEBKIT_API WebString suggestedFileName() const;
+ WEBKIT_API void setSuggestedFileName(const WebString&);
+
+ WEBKIT_API int httpStatusCode() const;
+ WEBKIT_API void setHTTPStatusCode(int);
+
+ WEBKIT_API WebString httpStatusText() const;
+ WEBKIT_API void setHTTPStatusText(const WebString&);
+
+ WEBKIT_API WebString httpHeaderField(const WebString& name) const;
+ WEBKIT_API void setHTTPHeaderField(const WebString& name, const WebString& value);
+ WEBKIT_API void addHTTPHeaderField(const WebString& name, const WebString& value);
+ WEBKIT_API void clearHTTPHeaderField(const WebString& name);
+ WEBKIT_API void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
+
+ WEBKIT_API double lastModifiedDate() const;
+ WEBKIT_API void setLastModifiedDate(double);
+
+ WEBKIT_API bool isContentFiltered() const;
+ WEBKIT_API void setIsContentFiltered(bool);
+
+ WEBKIT_API long long appCacheID() const;
+ WEBKIT_API void setAppCacheID(long long);
+
+ WEBKIT_API WebURL appCacheManifestURL() const;
+ WEBKIT_API void setAppCacheManifestURL(const WebURL&);
+
+ // A consumer controlled value intended to be used to record opaque
+ // security info related to this request.
+ WEBKIT_API WebCString securityInfo() const;
+ WEBKIT_API void setSecurityInfo(const WebCString&);
+
+#if defined(WEBKIT_IMPLEMENTATION)
+ WebCore::ResourceResponse& toMutableResourceResponse();
+ const WebCore::ResourceResponse& toResourceResponse() const;
+#endif
+
+ // Flag whether this request was served from the disk cache entry.
+ WEBKIT_API bool wasCached() const;
+ WEBKIT_API void setWasCached(bool);
+
+ // Flag whether this request was loaded via the SPDY protocol or not.
+ // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy
+ WEBKIT_API bool wasFetchedViaSPDY() const;
+ WEBKIT_API void setWasFetchedViaSPDY(bool);
+
+ // Flag whether this request was loaded after the TLS/Next-Protocol-Negotiation was used.
+ // This is related to SPDY.
+ WEBKIT_API bool wasNpnNegotiated() const;
+ WEBKIT_API void setWasNpnNegotiated(bool);
+
+ // Flag whether this request was made when "Alternate-Protocol: xxx"
+ // is present in server's response.
+ WEBKIT_API bool wasAlternateProtocolAvailable() const;
+ WEBKIT_API void setWasAlternateProtocolAvailable(bool);
+
+ // Flag whether this request was loaded via an explicit proxy (HTTP, SOCKS, etc).
+ WEBKIT_API bool wasFetchedViaProxy() const;
+ WEBKIT_API void setWasFetchedViaProxy(bool);
+
+ // Flag whether this request is part of a multipart response.
+ WEBKIT_API bool isMultipartPayload() const;
+ WEBKIT_API void setIsMultipartPayload(bool);
+
+ // This indicates the location of a downloaded response if the
+ // WebURLRequest had the downloadToFile flag set to true. This file path
+ // remains valid for the lifetime of the WebURLLoader used to create it.
+ WEBKIT_API WebString downloadFilePath() const;
+ WEBKIT_API void setDownloadFilePath(const WebString&);
+
+protected:
+ void assign(WebURLResponsePrivate*);
+
+private:
+ WebURLResponsePrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebVector.h b/Source/WebKit/chromium/public/WebVector.h
new file mode 100644
index 0000000..cf3ec95
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebVector.h
@@ -0,0 +1,177 @@
+/*
+ * Copyright (C) 2009 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 WebVector_h
+#define WebVector_h
+
+#include "WebCommon.h"
+
+#include <algorithm>
+
+namespace WebKit {
+
+// A simple vector class.
+//
+// Sample usage:
+//
+// void Foo(WebVector<int>& result)
+// {
+// WebVector<int> data(10);
+// for (size_t i = 0; i < data.size(); ++i)
+// data[i] = ...
+// result.swap(data);
+// }
+//
+// It is also possible to assign from other types of random access
+// containers:
+//
+// void Foo(const std::vector<std::string>& input)
+// {
+// WebVector<WebCString> cstrings = input;
+// ...
+// }
+//
+template <typename T>
+class WebVector {
+public:
+ typedef T ValueType;
+
+ ~WebVector()
+ {
+ destroy();
+ }
+
+ explicit WebVector(size_t size = 0)
+ {
+ initialize(size);
+ }
+
+ WebVector(const WebVector<T>& other)
+ {
+ initializeFrom(other.m_ptr, other.m_size);
+ }
+
+ template <typename C>
+ WebVector(const C& other)
+ {
+ initializeFrom(other.size() ? &other[0] : 0, other.size());
+ }
+
+ WebVector& operator=(const WebVector& other)
+ {
+ if (this != &other)
+ assign(other);
+ return *this;
+ }
+
+ template <typename C>
+ WebVector<T>& operator=(const C& other)
+ {
+ if (this != reinterpret_cast<const WebVector<T>*>(&other))
+ assign(other);
+ return *this;
+ }
+
+ template <typename C>
+ void assign(const C& other)
+ {
+ assign(other.size() ? &other[0] : 0, other.size());
+ }
+
+ template <typename U>
+ void assign(const U* values, size_t size)
+ {
+ destroy();
+ initializeFrom(values, size);
+ }
+
+ size_t size() const { return m_size; }
+ bool isEmpty() const { return !m_size; }
+
+ T& operator[](size_t i)
+ {
+ WEBKIT_ASSERT(i < m_size);
+ return m_ptr[i];
+ }
+ const T& operator[](size_t i) const
+ {
+ WEBKIT_ASSERT(i < m_size);
+ return m_ptr[i];
+ }
+
+ T* data() { return m_ptr; }
+ const T* data() const { return m_ptr; }
+
+ void swap(WebVector<T>& other)
+ {
+ std::swap(m_ptr, other.m_ptr);
+ std::swap(m_size, other.m_size);
+ }
+
+private:
+ void initialize(size_t size)
+ {
+ m_size = size;
+ if (!m_size)
+ m_ptr = 0;
+ else {
+ m_ptr = static_cast<T*>(::operator new(sizeof(T) * m_size));
+ for (size_t i = 0; i < m_size; ++i)
+ new (&m_ptr[i]) T();
+ }
+ }
+
+ template <typename U>
+ void initializeFrom(const U* values, size_t size)
+ {
+ m_size = size;
+ if (!m_size)
+ m_ptr = 0;
+ else {
+ m_ptr = static_cast<T*>(::operator new(sizeof(T) * m_size));
+ for (size_t i = 0; i < m_size; ++i)
+ new (&m_ptr[i]) T(values[i]);
+ }
+ }
+
+ void destroy()
+ {
+ for (size_t i = 0; i < m_size; ++i)
+ m_ptr[i].~T();
+ ::operator delete(m_ptr);
+ }
+
+ T* m_ptr;
+ size_t m_size;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebVideoFrame.h b/Source/WebKit/chromium/public/WebVideoFrame.h
new file mode 100644
index 0000000..58f1111
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebVideoFrame.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 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 WebVideoFrame_h
+#define WebVideoFrame_h
+
+namespace WebKit {
+
+// A proxy video frame interface to communicate frame data between chromium
+// and WebKit.
+class WebVideoFrame {
+public:
+ enum Format {
+ FormatInvalid,
+ FormatRGB555,
+ FormatRGB565,
+ FormatRGB24,
+ FormatRGB32,
+ FormatRGBA,
+ FormatYV12,
+ FormatYV16,
+ FormatNV12,
+ FormatEmpty,
+ FormatASCII,
+ };
+
+ enum SurfaceType {
+ SurfaceTypeSystemMemory,
+ SurfaceTypeTexture,
+ };
+
+ virtual SurfaceType surfaceType() const = 0;
+ virtual Format format() const = 0;
+ virtual unsigned width() const = 0;
+ virtual unsigned height() const = 0;
+ virtual unsigned planes() const = 0;
+ virtual int stride(unsigned plane) const = 0;
+ virtual const void* data(unsigned plane) const = 0;
+ virtual unsigned texture(unsigned plane) const = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebView.h b/Source/WebKit/chromium/public/WebView.h
new file mode 100644
index 0000000..4243998
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebView.h
@@ -0,0 +1,373 @@
+/*
+ * Copyright (C) 2009 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 WebView_h
+#define WebView_h
+
+#include "WebDragOperation.h"
+#include "WebString.h"
+#include "WebVector.h"
+#include "WebWidget.h"
+
+// FIXME(jam): take out once Chromium rolls past this revision
+#define WEBKIT_HAS_WEB_AUTO_FILL_CLIENT
+
+namespace WebKit {
+
+class WebAccessibilityObject;
+class WebAutoFillClient;
+class WebDevToolsAgent;
+class WebDevToolsAgentClient;
+class WebDragData;
+class WebFrame;
+class WebFrameClient;
+class WebGraphicsContext3D;
+class WebNode;
+class WebSettings;
+class WebString;
+class WebViewClient;
+struct WebMediaPlayerAction;
+struct WebPoint;
+
+class WebView : public WebWidget {
+public:
+ WEBKIT_API static const double textSizeMultiplierRatio;
+ WEBKIT_API static const double minTextSizeMultiplier;
+ WEBKIT_API static const double maxTextSizeMultiplier;
+
+ // Controls the time that user scripts injected into the document run.
+ enum UserScriptInjectAt {
+ UserScriptInjectAtDocumentStart,
+ UserScriptInjectAtDocumentEnd
+ };
+
+ // Controls which frames user content is injected into.
+ enum UserContentInjectIn {
+ UserContentInjectInAllFrames,
+ UserContentInjectInTopFrameOnly
+ };
+
+ // Controls which documents user styles are injected into.
+ enum UserStyleInjectionTime {
+ UserStyleInjectInExistingDocuments,
+ UserStyleInjectInSubsequentDocuments
+ };
+
+
+ // Initialization ------------------------------------------------------
+
+ // Creates a WebView that is NOT yet initialized. You will need to
+ // call initializeMainFrame to finish the initialization. It is valid
+ // to pass null client pointers.
+ WEBKIT_API static WebView* create(WebViewClient*,
+ WebDevToolsAgentClient*,
+ WebAutoFillClient*);
+
+ // After creating a WebView, you should immediately call this method.
+ // You can optionally modify the settings before calling this method.
+ // The WebFrameClient will receive events for the main frame and any
+ // child frames. It is valid to pass a null WebFrameClient pointer.
+ virtual void initializeMainFrame(WebFrameClient*) = 0;
+
+
+ // Options -------------------------------------------------------------
+
+ // The returned pointer is valid for the lifetime of the WebView.
+ virtual WebSettings* settings() = 0;
+
+ // Corresponds to the encoding of the main frame. Setting the page
+ // encoding may cause the main frame to reload.
+ virtual WebString pageEncoding() const = 0;
+ virtual void setPageEncoding(const WebString&) = 0;
+
+ // Makes the WebView transparent. This is useful if you want to have
+ // some custom background rendered behind it.
+ virtual bool isTransparent() const = 0;
+ virtual void setIsTransparent(bool) = 0;
+
+ // Controls whether pressing Tab key advances focus to links.
+ virtual bool tabsToLinks() const = 0;
+ virtual void setTabsToLinks(bool) = 0;
+
+ // Method that controls whether pressing Tab key cycles through page
+ // elements or inserts a '\t' char in the focused text area.
+ virtual bool tabKeyCyclesThroughElements() const = 0;
+ virtual void setTabKeyCyclesThroughElements(bool) = 0;
+
+ // Controls the WebView's active state, which may affect the rendering
+ // of elements on the page (i.e., tinting of input elements).
+ virtual bool isActive() const = 0;
+ virtual void setIsActive(bool) = 0;
+
+ // Allows disabling domain relaxation.
+ virtual void setDomainRelaxationForbidden(bool, const WebString& scheme) = 0;
+
+
+ // Closing -------------------------------------------------------------
+
+ // Runs beforeunload handlers for the current page, returning false if
+ // any handler suppressed unloading.
+ virtual bool dispatchBeforeUnloadEvent() = 0;
+
+ // Runs unload handlers for the current page.
+ virtual void dispatchUnloadEvent() = 0;
+
+
+ // Frames --------------------------------------------------------------
+
+ virtual WebFrame* mainFrame() = 0;
+
+ // Returns the frame identified by the given name. This method
+ // supports pseudo-names like _self, _top, and _blank. It traverses
+ // the entire frame tree containing this tree looking for a frame that
+ // matches the given name. If the optional relativeToFrame parameter
+ // is specified, then the search begins with the given frame and its
+ // children.
+ virtual WebFrame* findFrameByName(
+ const WebString& name, WebFrame* relativeToFrame = 0) = 0;
+
+
+ // Focus ---------------------------------------------------------------
+
+ virtual WebFrame* focusedFrame() = 0;
+ virtual void setFocusedFrame(WebFrame*) = 0;
+
+ // Focus the first (last if reverse is true) focusable node.
+ virtual void setInitialFocus(bool reverse) = 0;
+
+ // Clears the focused node (and selection if a text field is focused)
+ // to ensure that a text field on the page is not eating keystrokes we
+ // send it.
+ virtual void clearFocusedNode() = 0;
+
+ // Scrolls the node currently in focus into view.
+ virtual void scrollFocusedNodeIntoView() = 0;
+
+
+ // Zoom ----------------------------------------------------------------
+
+ // Returns the current zoom level. 0 is "original size", and each increment
+ // above or below represents zooming 20% larger or smaller to default limits
+ // of 300% and 50% of original size, respectively. Only plugins use
+ // non whole-numbers, since they might choose to have specific zoom level so
+ // that fixed-width content is fit-to-page-width, for example.
+ virtual double zoomLevel() = 0;
+
+ // Changes the zoom level to the specified level, clamping at the limits
+ // noted above, and returns the current zoom level after applying the
+ // change.
+ //
+ // If |textOnly| is set, only the text will be zoomed; otherwise the entire
+ // page will be zoomed. You can only have either text zoom or full page zoom
+ // at one time. Changing the mode while the page is zoomed will have odd
+ // effects.
+ virtual double setZoomLevel(bool textOnly, double zoomLevel) = 0;
+
+ // Updates the zoom limits for this view.
+ virtual void zoomLimitsChanged(double minimumZoomLevel,
+ double maximumZoomLevel) = 0;
+
+ // Helper functions to convert between zoom level and zoom factor. zoom
+ // factor is zoom percent / 100, so 300% = 3.0.
+ WEBKIT_API static double zoomLevelToZoomFactor(double zoomLevel);
+ WEBKIT_API static double zoomFactorToZoomLevel(double factor);
+
+
+ // Media ---------------------------------------------------------------
+
+ // Performs the specified action on the node at the given location.
+ virtual void performMediaPlayerAction(
+ const WebMediaPlayerAction&, const WebPoint& location) = 0;
+
+
+ // Data exchange -------------------------------------------------------
+
+ // Copy to the clipboard the image located at a particular point in the
+ // WebView (if there is such an image)
+ virtual void copyImageAt(const WebPoint&) = 0;
+
+ // Notifies the WebView that a drag has terminated.
+ virtual void dragSourceEndedAt(
+ const WebPoint& clientPoint, const WebPoint& screenPoint,
+ WebDragOperation operation) = 0;
+
+ // Notifies the WebView that a drag is going on.
+ virtual void dragSourceMovedTo(
+ const WebPoint& clientPoint, const WebPoint& screenPoint,
+ WebDragOperation operation) = 0;
+
+ // Notfies the WebView that the system drag and drop operation has ended.
+ virtual void dragSourceSystemDragEnded() = 0;
+
+ // Callback methods when a drag-and-drop operation is trying to drop
+ // something on the WebView.
+ virtual WebDragOperation dragTargetDragEnter(
+ const WebDragData&, int identity,
+ const WebPoint& clientPoint, const WebPoint& screenPoint,
+ WebDragOperationsMask operationsAllowed) = 0;
+ virtual WebDragOperation dragTargetDragEnterNew(
+ int identity, const WebPoint& clientPoint, const WebPoint& screenPoint,
+ WebDragOperationsMask operationsAllowed) = 0;
+ virtual WebDragOperation dragTargetDragOver(
+ const WebPoint& clientPoint, const WebPoint& screenPoint,
+ WebDragOperationsMask operationsAllowed) = 0;
+ virtual void dragTargetDragLeave() = 0;
+ virtual void dragTargetDrop(
+ const WebPoint& clientPoint, const WebPoint& screenPoint) = 0;
+
+ virtual int dragIdentity() = 0;
+
+ // Helper method for drag and drop target operations: override the
+ // default drop effect with either a "copy" (accept true) or "none"
+ // (accept false) effect. Return true on success.
+ virtual bool setDropEffect(bool accept) = 0;
+
+
+ // Support for resource loading initiated by plugins -------------------
+
+ // Returns next unused request identifier which is unique within the
+ // parent Page.
+ virtual unsigned long createUniqueIdentifierForRequest() = 0;
+
+
+ // Developer tools -----------------------------------------------------
+
+ // Inspect a particular point in the WebView. (x = -1 || y = -1) is a
+ // special case, meaning inspect the current page and not a specific
+ // point.
+ virtual void inspectElementAt(const WebPoint&) = 0;
+
+ // Settings used by the inspector.
+ virtual WebString inspectorSettings() const = 0;
+ virtual void setInspectorSettings(const WebString&) = 0;
+ virtual bool inspectorSetting(const WebString& key,
+ WebString* value) const = 0;
+ virtual void setInspectorSetting(const WebString& key,
+ const WebString& value) = 0;
+
+ // The embedder may optionally engage a WebDevToolsAgent. This may only
+ // be set once per WebView.
+ virtual WebDevToolsAgent* devToolsAgent() = 0;
+
+
+ // Accessibility -------------------------------------------------------
+
+ // Returns the accessibility object for this view.
+ virtual WebAccessibilityObject accessibilityObject() = 0;
+
+
+ // AutoFill -----------------------------------------------------------
+
+ // Notifies the WebView that AutoFill suggestions are available for a node.
+ // |uniqueIDs| is a vector of IDs that represent the unique ID of each
+ // AutoFill profile in the suggestions popup. If a unique ID is 0, then the
+ // corresponding suggestion comes from Autocomplete rather than AutoFill.
+ // If a unique ID is negative, then the corresponding "suggestion" is
+ // actually a user-facing warning, e.g. explaining why AutoFill is
+ // unavailable for the current form.
+ virtual void applyAutoFillSuggestions(
+ const WebNode&,
+ const WebVector<WebString>& names,
+ const WebVector<WebString>& labels,
+ const WebVector<WebString>& icons,
+ const WebVector<int>& uniqueIDs,
+ int separatorIndex) = 0;
+
+ // Hides any popup (suggestions, selects...) that might be showing.
+ virtual void hidePopups() = 0;
+
+
+ // Context menu --------------------------------------------------------
+
+ virtual void performCustomContextMenuAction(unsigned action) = 0;
+
+
+ // Popup menu ----------------------------------------------------------
+
+ // Sets whether select popup menus should be rendered by the browser.
+ WEBKIT_API static void setUseExternalPopupMenus(bool);
+
+
+ // Visited link state --------------------------------------------------
+
+ // Tells all WebView instances to update the visited link state for the
+ // specified hash.
+ WEBKIT_API static void updateVisitedLinkState(unsigned long long hash);
+
+ // Tells all WebView instances to update the visited state for all
+ // their links.
+ WEBKIT_API static void resetVisitedLinkState();
+
+
+ // Custom colors -------------------------------------------------------
+
+ virtual void setScrollbarColors(unsigned inactiveColor,
+ unsigned activeColor,
+ unsigned trackColor) = 0;
+
+ virtual void setSelectionColors(unsigned activeBackgroundColor,
+ unsigned activeForegroundColor,
+ unsigned inactiveBackgroundColor,
+ unsigned inactiveForegroundColor) = 0;
+
+ // User scripts --------------------------------------------------------
+ WEBKIT_API static void addUserScript(const WebString& sourceCode,
+ const WebVector<WebString>& patterns,
+ UserScriptInjectAt injectAt,
+ UserContentInjectIn injectIn);
+ WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode,
+ const WebVector<WebString>& patterns,
+ UserContentInjectIn injectIn,
+ UserStyleInjectionTime injectionTime = UserStyleInjectInSubsequentDocuments);
+ WEBKIT_API static void removeAllUserContent();
+
+ // Modal dialog support ------------------------------------------------
+
+ // Call these methods before and after running a nested, modal event loop
+ // to suspend script callbacks and resource loads.
+ WEBKIT_API static void willEnterModalLoop();
+ WEBKIT_API static void didExitModalLoop();
+
+ // GPU acceleration support --------------------------------------------
+
+ // Returns the (on-screen) WebGraphicsContext3D associated with
+ // this WebView. One will be created if it doesn't already exist.
+ // This is used to set up sharing between this context (which is
+ // that used by the compositor) and contexts for WebGL and other
+ // APIs.
+ virtual WebGraphicsContext3D* graphicsContext3D() = 0;
+
+protected:
+ ~WebView() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebViewClient.h b/Source/WebKit/chromium/public/WebViewClient.h
new file mode 100644
index 0000000..08fb942
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebViewClient.h
@@ -0,0 +1,331 @@
+/*
+ * Copyright (C) 2009 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 WebViewClient_h
+#define WebViewClient_h
+
+#include "WebAccessibilityNotification.h"
+#include "WebDragOperation.h"
+#include "WebEditingAction.h"
+#include "WebFileChooserCompletion.h"
+#include "WebFileChooserParams.h"
+#include "WebPopupType.h"
+#include "WebString.h"
+#include "WebTextAffinity.h"
+#include "WebTextDirection.h"
+#include "WebWidgetClient.h"
+
+namespace WebKit {
+
+class WebAccessibilityObject;
+class WebDeviceOrientationClient;
+class WebDragData;
+class WebElement;
+class WebExternalPopupMenu;
+class WebExternalPopupMenuClient;
+class WebFileChooserCompletion;
+class WebFrame;
+class WebGeolocationClient;
+class WebGeolocationService;
+class WebImage;
+class WebInputElement;
+class WebKeyboardEvent;
+class WebNode;
+class WebNotificationPresenter;
+class WebRange;
+class WebSpeechInputController;
+class WebSpeechInputListener;
+class WebStorageNamespace;
+class WebURL;
+class WebURLRequest;
+class WebView;
+class WebWidget;
+struct WebConsoleMessage;
+struct WebContextMenuData;
+struct WebPoint;
+struct WebPopupMenuInfo;
+struct WebWindowFeatures;
+
+// Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient.
+// Virtual inheritance allows an implementation of WebWidgetClient to be
+// easily reused as part of an implementation of WebViewClient.
+class WebViewClient : virtual public WebWidgetClient {
+public:
+ // Factory methods -----------------------------------------------------
+
+ // Create a new related WebView. This method must clone its session storage
+ // so any subsequent calls to createSessionStorageNamespace conform to the
+ // WebStorage specification.
+ // The request parameter is only for the client to check if the request
+ // could be fulfilled. The client should not load the request.
+ virtual WebView* createView(WebFrame* creator,
+ const WebURLRequest& request,
+ const WebWindowFeatures& features,
+ const WebString& name) {
+ return 0;
+ }
+
+ // Create a new WebPopupMenu. In the second form, the client is
+ // responsible for rendering the contents of the popup menu.
+ virtual WebWidget* createPopupMenu(WebPopupType) { return 0; }
+ virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
+ virtual WebExternalPopupMenu* createExternalPopupMenu(
+ const WebPopupMenuInfo&, WebExternalPopupMenuClient*) { return 0; }
+
+ // Create a session storage namespace object associated with this WebView.
+ virtual WebStorageNamespace* createSessionStorageNamespace(unsigned quota) { return 0; }
+
+ // Misc ----------------------------------------------------------------
+
+ // A new message was added to the console.
+ virtual void didAddMessageToConsole(
+ const WebConsoleMessage&, const WebString& sourceName, unsigned sourceLine) { }
+
+ // Called when script in the page calls window.print(). If frame is
+ // non-null, then it selects a particular frame, including its
+ // children, to print. Otherwise, the main frame and its children
+ // should be printed.
+ virtual void printPage(WebFrame*) { }
+
+ // Called to retrieve the provider of desktop notifications.
+ virtual WebNotificationPresenter* notificationPresenter() { return 0; }
+
+
+ // Navigational --------------------------------------------------------
+
+ // These notifications bracket any loading that occurs in the WebView.
+ virtual void didStartLoading() { }
+ virtual void didStopLoading() { }
+
+ // Notification that some progress was made loading the current page.
+ // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully
+ // loaded).
+ virtual void didChangeLoadProgress(WebFrame*, double loadProgress) { }
+
+ // Editing -------------------------------------------------------------
+
+ // These methods allow the client to intercept and overrule editing
+ // operations.
+ virtual bool shouldBeginEditing(const WebRange&) { return true; }
+ virtual bool shouldEndEditing(const WebRange&) { return true; }
+ virtual bool shouldInsertNode(
+ const WebNode&, const WebRange&, WebEditingAction) { return true; }
+ virtual bool shouldInsertText(
+ const WebString&, const WebRange&, WebEditingAction) { return true; }
+ virtual bool shouldChangeSelectedRange(
+ const WebRange& from, const WebRange& to, WebTextAffinity,
+ bool stillSelecting) { return true; }
+ virtual bool shouldDeleteRange(const WebRange&) { return true; }
+ virtual bool shouldApplyStyle(const WebString& style, const WebRange&) { return true; }
+
+ virtual bool isSmartInsertDeleteEnabled() { return true; }
+ virtual bool isSelectTrailingWhitespaceEnabled() { return true; }
+
+ virtual void didBeginEditing() { }
+ virtual void didChangeSelection(bool isSelectionEmpty) { }
+ virtual void didChangeContents() { }
+ virtual void didExecuteCommand(const WebString& commandName) { }
+ virtual void didEndEditing() { }
+
+ // This method is called in response to WebView's handleInputEvent()
+ // when the default action for the current keyboard event is not
+ // suppressed by the page, to give the embedder a chance to handle
+ // the keyboard event specially.
+ //
+ // Returns true if the keyboard event was handled by the embedder,
+ // indicating that the default action should be suppressed.
+ virtual bool handleCurrentKeyboardEvent() { return false; }
+
+
+ // Spellchecker --------------------------------------------------------
+
+ // The client should perform spell-checking on the given text. If the
+ // text contains a misspelled word, then upon return misspelledOffset
+ // will point to the start of the misspelled word, and misspelledLength
+ // will indicates its length. Otherwise, if there was not a spelling
+ // error, then upon return misspelledLength is 0.
+ virtual void spellCheck(
+ const WebString& text, int& misspelledOffset, int& misspelledLength) { }
+
+ // Computes an auto-corrected replacement for a misspelled word. If no
+ // replacement is found, then an empty string is returned.
+ virtual WebString autoCorrectWord(const WebString& misspelledWord) { return WebString(); }
+
+ // Show or hide the spelling UI.
+ virtual void showSpellingUI(bool show) { }
+
+ // Returns true if the spelling UI is showing.
+ virtual bool isShowingSpellingUI() { return false; }
+
+ // Update the spelling UI with the given word.
+ virtual void updateSpellingUIWithMisspelledWord(const WebString& word) { }
+
+
+ // Dialogs -------------------------------------------------------------
+
+ // This method returns immediately after showing the dialog. When the
+ // dialog is closed, it should call the WebFileChooserCompletion to
+ // pass the results of the dialog. Returns false if
+ // WebFileChooseCompletion will never be called.
+ virtual bool runFileChooser(const WebFileChooserParams&,
+ WebFileChooserCompletion*) { return false; }
+
+ // Displays a modal alert dialog containing the given message. Returns
+ // once the user dismisses the dialog.
+ virtual void runModalAlertDialog(
+ WebFrame*, const WebString& message) { }
+
+ // Displays a modal confirmation dialog with the given message as
+ // description and OK/Cancel choices. Returns true if the user selects
+ // 'OK' or false otherwise.
+ virtual bool runModalConfirmDialog(
+ WebFrame*, const WebString& message) { return false; }
+
+ // Displays a modal input dialog with the given message as description
+ // and OK/Cancel choices. The input field is pre-filled with
+ // defaultValue. Returns true if the user selects 'OK' or false
+ // otherwise. Upon returning true, actualValue contains the value of
+ // the input field.
+ virtual bool runModalPromptDialog(
+ WebFrame*, const WebString& message, const WebString& defaultValue,
+ WebString* actualValue) { return false; }
+
+ // Displays a modal confirmation dialog containing the given message as
+ // description and OK/Cancel choices, where 'OK' means that it is okay
+ // to proceed with closing the view. Returns true if the user selects
+ // 'OK' or false otherwise.
+ virtual bool runModalBeforeUnloadDialog(
+ WebFrame*, const WebString& message) { return true; }
+
+ virtual bool supportsFullscreen() { return false; }
+ virtual void enterFullscreenForNode(const WebNode&) { }
+ virtual void exitFullscreenForNode(const WebNode&) { }
+
+ // UI ------------------------------------------------------------------
+
+ // Called when script modifies window.status
+ virtual void setStatusText(const WebString&) { }
+
+ // Called when hovering over an anchor with the given URL.
+ virtual void setMouseOverURL(const WebURL&) { }
+
+ // Called when keyboard focus switches to an anchor with the given URL.
+ virtual void setKeyboardFocusURL(const WebURL&) { }
+
+ // Called when a tooltip should be shown at the current cursor position.
+ virtual void setToolTipText(const WebString&, WebTextDirection hint) { }
+
+ // Shows a context menu with commands relevant to a specific element on
+ // the given frame. Additional context data is supplied.
+ virtual void showContextMenu(WebFrame*, const WebContextMenuData&) { }
+
+ // Called when a drag-n-drop operation should begin.
+ virtual void startDragging(
+ const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint&) { }
+
+ // Called to determine if drag-n-drop operations may initiate a page
+ // navigation.
+ virtual bool acceptsLoadDrops() { return true; }
+
+ // Take focus away from the WebView by focusing an adjacent UI element
+ // in the containing window.
+ virtual void focusNext() { }
+ virtual void focusPrevious() { }
+
+ // Called when a new node gets focused.
+ virtual void focusedNodeChanged(const WebNode&) { }
+
+
+ // Session history -----------------------------------------------------
+
+ // Tells the embedder to navigate back or forward in session history by
+ // the given offset (relative to the current position in session
+ // history).
+ virtual void navigateBackForwardSoon(int offset) { }
+
+ // Returns the number of history items before/after the current
+ // history item.
+ virtual int historyBackListCount() { return 0; }
+ virtual int historyForwardListCount() { return 0; }
+
+ // Called to notify the embedder when a new history item is added.
+ virtual void didAddHistoryItem() { }
+
+
+ // Accessibility -------------------------------------------------------
+
+ // Notifies embedder about an accessibility notification.
+ virtual void postAccessibilityNotification(const WebAccessibilityObject&, WebAccessibilityNotification) { }
+
+
+ // Developer tools -----------------------------------------------------
+
+ // Called to notify the client that the inspector's settings were
+ // changed and should be saved. See WebView::inspectorSettings.
+ virtual void didUpdateInspectorSettings() { }
+
+ virtual void didUpdateInspectorSetting(const WebString& key, const WebString& value) { }
+
+ // Geolocation ---------------------------------------------------------
+
+ // Access the embedder API for (client-based) geolocation client .
+ virtual WebGeolocationClient* geolocationClient() { return 0; }
+ // Access the embedder API for (non-client-based) geolocation services.
+ virtual WebGeolocationService* geolocationService() { return 0; }
+
+ // Speech --------------------------------------------------------------
+
+ // Access the embedder API for speech input services.
+ virtual WebSpeechInputController* speechInputController(
+ WebSpeechInputListener*) { return 0; }
+
+ // Device Orientation --------------------------------------------------
+
+ // Access the embedder API for device orientation services.
+ virtual WebDeviceOrientationClient* deviceOrientationClient() { return 0; }
+
+
+ // Zoom ----------------------------------------------------------------
+
+ // Informs the browser that the zoom levels for this frame have changed from
+ // the default values.
+ virtual void zoomLimitsChanged(double minimumLevel, double maximumLevel) { }
+
+ // Informs the browser that the zoom level has changed as a result of an
+ // action that wasn't initiated by the client.
+ virtual void zoomLevelChanged() { }
+
+protected:
+ ~WebViewClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebWidget.h b/Source/WebKit/chromium/public/WebWidget.h
new file mode 100644
index 0000000..ccad134
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebWidget.h
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2009 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 WebWidget_h
+#define WebWidget_h
+
+#include "WebCanvas.h"
+#include "WebCommon.h"
+#include "WebCompositionUnderline.h"
+#include "WebTextInputType.h"
+#include "WebTextDirection.h"
+
+namespace WebKit {
+
+class WebInputEvent;
+class WebString;
+struct WebRect;
+struct WebSize;
+template <typename T> class WebVector;
+
+class WebWidget {
+public:
+ // This method closes and deletes the WebWidget.
+ virtual void close() = 0;
+
+ // Returns the current size of the WebWidget.
+ virtual WebSize size() = 0;
+
+ // Called to resize the WebWidget.
+ virtual void resize(const WebSize&) = 0;
+
+ // Called to layout the WebWidget. This MUST be called before Paint,
+ // and it may result in calls to WebWidgetClient::didInvalidateRect.
+ virtual void layout() = 0;
+
+ // Called to paint the rectangular region within the WebWidget
+ // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call
+ // Layout before calling this method. It is okay to call paint
+ // multiple times once layout has been called, assuming no other
+ // changes are made to the WebWidget (e.g., once events are
+ // processed, it should be assumed that another call to layout is
+ // warranted before painting again).
+ virtual void paint(WebCanvas*, const WebRect& viewPort) = 0;
+
+ // Triggers compositing of the current layers onto the screen.
+ // The finish argument controls whether the compositor will wait for the
+ // GPU to finish rendering before returning. You MUST call Layout
+ // before calling this method, for the same reasons described in
+ // the paint method above.
+ virtual void composite(bool finish) = 0;
+
+ // Called to inform the WebWidget of a change in theme.
+ // Implementors that cache rendered copies of widgets need to re-render
+ // on receiving this message
+ virtual void themeChanged() = 0;
+
+ // Called to inform the WebWidget of an input event. Returns true if
+ // the event has been processed, false otherwise.
+ virtual bool handleInputEvent(const WebInputEvent&) = 0;
+
+ // Called to inform the WebWidget that mouse capture was lost.
+ virtual void mouseCaptureLost() = 0;
+
+ // Called to inform the WebWidget that it has gained or lost keyboard focus.
+ virtual void setFocus(bool) = 0;
+
+ // Called to inform the WebWidget of a new composition text.
+ // If selectionStart and selectionEnd has the same value, then it indicates
+ // the input caret position. If the text is empty, then the existing
+ // composition text will be cancelled.
+ // Returns true if the composition text was set successfully.
+ virtual bool setComposition(
+ const WebString& text,
+ const WebVector<WebCompositionUnderline>& underlines,
+ int selectionStart,
+ int selectionEnd) = 0;
+
+ // Called to inform the WebWidget to confirm an ongoing composition.
+ // This method is same as confirmComposition(WebString());
+ // Returns true if there is an ongoing composition.
+ virtual bool confirmComposition() = 0;
+
+ // Called to inform the WebWidget to confirm an ongoing composition with a
+ // new composition text. If the text is empty then the current composition
+ // text is confirmed. If there is no ongoing composition, then deletes the
+ // current selection and inserts the text. This method has no effect if
+ // there is no ongoing composition and the text is empty.
+ // Returns true if there is an ongoing composition or the text is inserted.
+ virtual bool confirmComposition(const WebString& text) = 0;
+
+ // Returns the current text input type of this WebWidget.
+ virtual WebTextInputType textInputType() = 0;
+
+ // Returns the current caret bounds of this WebWidget. The selection bounds
+ // will be returned if a selection range is available.
+ virtual WebRect caretOrSelectionBounds() = 0;
+
+ // Changes the text direction of the selected input node.
+ virtual void setTextDirection(WebTextDirection) = 0;
+
+ // Returns true if the WebWidget uses GPU accelerated compositing
+ // to render its contents.
+ virtual bool isAcceleratedCompositingActive() const = 0;
+
+protected:
+ ~WebWidget() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebWidgetClient.h b/Source/WebKit/chromium/public/WebWidgetClient.h
new file mode 100644
index 0000000..373426d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebWidgetClient.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2009 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 WebWidgetClient_h
+#define WebWidgetClient_h
+
+#include "WebCommon.h"
+#include "WebNavigationPolicy.h"
+#include "WebRect.h"
+#include "WebScreenInfo.h"
+
+namespace WebKit {
+
+class WebWidget;
+struct WebCursorInfo;
+
+class WebWidgetClient {
+public:
+ // Called when a region of the WebWidget needs to be re-painted.
+ virtual void didInvalidateRect(const WebRect&) { }
+
+ // Called when a region of the WebWidget, given by clipRect, should be
+ // scrolled by the specified dx and dy amounts.
+ virtual void didScrollRect(int dx, int dy, const WebRect& clipRect) { }
+
+ // Called when the compositor enables or disables.
+ virtual void didActivateAcceleratedCompositing(bool active) { }
+
+ // Called when a call to WebWidget::composite is required
+ virtual void scheduleComposite() { }
+
+ // Called when the widget acquires or loses focus, respectively.
+ virtual void didFocus() { }
+ virtual void didBlur() { }
+
+ // Called when the cursor for the widget changes.
+ virtual void didChangeCursor(const WebCursorInfo&) { }
+
+ // Called when the widget should be closed. WebWidget::close() should
+ // be called asynchronously as a result of this notification.
+ virtual void closeWidgetSoon() { }
+
+ // Called to show the widget according to the given policy.
+ virtual void show(WebNavigationPolicy) { }
+
+ // Called to block execution of the current thread until the widget is
+ // closed.
+ virtual void runModal() { }
+
+ // Called to get/set the position of the widget in screen coordinates.
+ virtual WebRect windowRect() { return WebRect(); }
+ virtual void setWindowRect(const WebRect&) { }
+
+ // Called to get the position of the resizer rect in window coordinates.
+ virtual WebRect windowResizerRect() { return WebRect(); }
+
+ // Called to get the position of the root window containing the widget
+ // in screen coordinates.
+ virtual WebRect rootWindowRect() { return WebRect(); }
+
+ // Called to query information about the screen where this widget is
+ // displayed.
+ virtual WebScreenInfo screenInfo() { return WebScreenInfo(); }
+
+ // When this method gets called, WebWidgetClient implementation should
+ // reset the input method by cancelling any ongoing composition.
+ virtual void resetInputMethod() { }
+
+protected:
+ ~WebWidgetClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebWindowFeatures.h b/Source/WebKit/chromium/public/WebWindowFeatures.h
new file mode 100644
index 0000000..99d8580
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebWindowFeatures.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2010 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 WebWindowFeatures_h
+#define WebWindowFeatures_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "WindowFeatures.h"
+#endif
+
+namespace WebKit {
+
+struct WebWindowFeatures {
+ float x;
+ bool xSet;
+ float y;
+ bool ySet;
+ float width;
+ bool widthSet;
+ float height;
+ bool heightSet;
+
+ bool menuBarVisible;
+ bool statusBarVisible;
+ bool toolBarVisible;
+ bool locationBarVisible;
+ bool scrollbarsVisible;
+ bool resizable;
+
+ bool fullscreen;
+ bool dialog;
+ WebVector<WebString> additionalFeatures;
+
+ WebWindowFeatures()
+ : xSet(false)
+ , ySet(false)
+ , widthSet(false)
+ , heightSet(false)
+ , menuBarVisible(true)
+ , statusBarVisible(true)
+ , toolBarVisible(true)
+ , locationBarVisible(true)
+ , scrollbarsVisible(true)
+ , resizable(true)
+ , fullscreen(false)
+ , dialog(false)
+ {
+ }
+
+
+#if WEBKIT_IMPLEMENTATION
+ WebWindowFeatures(const WebCore::WindowFeatures& f)
+ : x(f.x)
+ , xSet(f.xSet)
+ , y(f.y)
+ , ySet(f.ySet)
+ , width(f.width)
+ , widthSet(f.widthSet)
+ , height(f.height)
+ , heightSet(f.heightSet)
+ , menuBarVisible(f.menuBarVisible)
+ , statusBarVisible(f.statusBarVisible)
+ , toolBarVisible(f.toolBarVisible)
+ , locationBarVisible(f.locationBarVisible)
+ , scrollbarsVisible(f.scrollbarsVisible)
+ , resizable(f.resizable)
+ , fullscreen(f.fullscreen)
+ , dialog(f.dialog)
+ , additionalFeatures(f.additionalFeatures)
+ {
+ }
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebWorker.h b/Source/WebKit/chromium/public/WebWorker.h
new file mode 100644
index 0000000..9397bcd
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebWorker.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 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 WebWorker_h
+#define WebWorker_h
+
+#include "WebMessagePortChannel.h"
+
+namespace WebKit {
+
+class WebString;
+class WebURL;
+class WebWorkerClient;
+
+// Provides an interface to the script execution context for a worker.
+class WebWorker {
+public:
+ // Instantiates a built-in WebWorker.
+ WEBKIT_API static WebWorker* create(WebWorkerClient*);
+
+ virtual ~WebWorker() { }
+ virtual void startWorkerContext(const WebURL& scriptURL,
+ const WebString& userAgent,
+ const WebString& sourceCode) = 0;
+ virtual void terminateWorkerContext() = 0;
+ virtual void postMessageToWorkerContext(
+ const WebString&,
+ const WebMessagePortChannelArray&) = 0;
+ virtual void workerObjectDestroyed() = 0;
+ virtual void clientDestroyed() = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebWorkerClient.h b/Source/WebKit/chromium/public/WebWorkerClient.h
new file mode 100644
index 0000000..eb2e63e
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebWorkerClient.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2009 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 WebWorkerClient_h
+#define WebWorkerClient_h
+
+#include "WebCommonWorkerClient.h"
+#include "WebMessagePortChannel.h"
+
+namespace WebKit {
+
+class WebNotificationPresenter;
+class WebString;
+class WebWorker;
+
+// Provides an interface back to the in-page script object for a worker.
+// All functions are expected to be called back on the thread that created
+// the Worker object, unless noted.
+class WebWorkerClient : public WebCommonWorkerClient {
+public:
+ virtual void postMessageToWorkerObject(
+ const WebString&,
+ const WebMessagePortChannelArray&) = 0;
+
+ virtual void confirmMessageFromWorkerObject(bool hasPendingActivity) = 0;
+ virtual void reportPendingActivity(bool hasPendingActivity) = 0;
+
+protected:
+ ~WebWorkerClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/gtk/WebFontInfo.h b/Source/WebKit/chromium/public/gtk/WebFontInfo.h
new file mode 100644
index 0000000..fae792d
--- /dev/null
+++ b/Source/WebKit/chromium/public/gtk/WebFontInfo.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009 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 WebFontInfo_h
+#define WebFontInfo_h
+
+#include "../WebCString.h"
+#include "../linux/WebFontRenderStyle.h"
+
+#include <string.h>
+#include <unistd.h>
+
+namespace WebKit {
+
+class WebFontInfo {
+public:
+ // Return a font family which provides glyphs for the Unicode code points
+ // specified by |utf16|
+ // characters: a native-endian UTF16 string
+ // numCharacters: the number of 16-bit words in |utf16|
+ //
+ // Returns: the font family or an empty string if the request could not be
+ // satisfied.
+ WEBKIT_API static WebCString familyForChars(const WebUChar* characters, size_t numCharacters);
+
+ // Fill out the given WebFontRenderStyle with the user's preferences for
+ // rendering the given font at the given size.
+ // family: i.e. "Times New Roman"
+ // sizeAndStyle:
+ // 3322222222221111111111
+ // 10987654321098765432109876543210
+ // +--------------------------------+
+ // |..............Size............IB|
+ // +--------------------------------+
+ // I: italic flag
+ // B: bold flag
+ WEBKIT_API static void renderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* result);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h b/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h
new file mode 100644
index 0000000..463bd28
--- /dev/null
+++ b/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 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 WebInputEventFactory_h
+#define WebInputEventFactory_h
+
+#include "../WebCommon.h"
+
+typedef struct _GdkEventButton GdkEventButton;
+typedef struct _GdkEventMotion GdkEventMotion;
+typedef struct _GdkEventCrossing GdkEventCrossing;
+typedef struct _GdkEventScroll GdkEventScroll;
+typedef struct _GdkEventKey GdkEventKey;
+
+namespace WebKit {
+
+class WebKeyboardEvent;
+class WebMouseEvent;
+class WebMouseWheelEvent;
+
+class WebInputEventFactory {
+public:
+ WEBKIT_API static WebKeyboardEvent keyboardEvent(const GdkEventKey*);
+ WEBKIT_API static WebKeyboardEvent keyboardEvent(wchar_t character, int state, double timeStampSeconds);
+ WEBKIT_API static WebMouseEvent mouseEvent(const GdkEventButton*);
+ WEBKIT_API static WebMouseEvent mouseEvent(const GdkEventMotion*);
+ WEBKIT_API static WebMouseEvent mouseEvent(const GdkEventCrossing*);
+ WEBKIT_API static WebMouseWheelEvent mouseWheelEvent(const GdkEventScroll*);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/linux/WebFontRenderStyle.h b/Source/WebKit/chromium/public/linux/WebFontRenderStyle.h
new file mode 100644
index 0000000..a3b180f
--- /dev/null
+++ b/Source/WebKit/chromium/public/linux/WebFontRenderStyle.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 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 WebFontRenderStyle_h
+#define WebFontRenderStyle_h
+
+#include "../WebCommon.h"
+
+namespace WebCore { struct FontRenderStyle; }
+
+namespace WebKit {
+
+struct WebFontRenderStyle {
+ // Each of the use* members below can take one of three values:
+ // 0: off
+ // 1: on
+ // 2: no preference expressed
+ char useBitmaps; // use embedded bitmap strike if possible
+ char useAutoHint; // use 'auto' hinting (FreeType specific)
+ char useHinting; // hint glyphs to the pixel grid
+ char hintStyle; // level of hinting, 0..3
+ char useAntiAlias; // antialias glyph shapes
+ char useSubpixel; // use subpixel antialias
+
+#ifdef WEBKIT_IMPLEMENTATION
+ // Translates the members of this struct to a FontRenderStyle
+ void toFontRenderStyle(WebCore::FontRenderStyle*);
+#endif
+
+ void setDefaults();
+};
+
+} // namespace WebKit
+
+#endif // WebFontRenderStyle_h
diff --git a/Source/WebKit/chromium/public/linux/WebFontRendering.h b/Source/WebKit/chromium/public/linux/WebFontRendering.h
new file mode 100644
index 0000000..9b61bdc
--- /dev/null
+++ b/Source/WebKit/chromium/public/linux/WebFontRendering.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2009 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 WebFontRendering_h
+#define WebFontRendering_h
+
+#include "../WebCommon.h"
+#include <SkFontHost.h>
+#include <SkPaint.h>
+
+namespace WebKit {
+
+class WebFontRendering {
+public:
+ // Set global font renderering preferences.
+
+ WEBKIT_API static void setHinting(SkPaint::Hinting);
+ WEBKIT_API static void setAntiAlias(bool on);
+ WEBKIT_API static void setSubpixelGlyphs(bool on);
+ WEBKIT_API static void setLCDOrder(SkFontHost::LCDOrder);
+ WEBKIT_API static void setLCDOrientation(SkFontHost::LCDOrientation);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/linux/WebRenderTheme.h b/Source/WebKit/chromium/public/linux/WebRenderTheme.h
new file mode 100644
index 0000000..e3be69d
--- /dev/null
+++ b/Source/WebKit/chromium/public/linux/WebRenderTheme.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2009 Joel Stanley. 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 WebRenderTheme_h
+#define WebRenderTheme_h
+
+#include "../WebCommon.h"
+
+namespace WebKit {
+
+// Set caret blink interval for text input areas.
+WEBKIT_API void setCaretBlinkInterval(double);
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/linux/WebSandboxSupport.h b/Source/WebKit/chromium/public/linux/WebSandboxSupport.h
new file mode 100644
index 0000000..6990abe
--- /dev/null
+++ b/Source/WebKit/chromium/public/linux/WebSandboxSupport.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 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 WebSandboxSupport_h
+#define WebSandboxSupport_h
+
+#include "../WebCommon.h"
+#include "../WebString.h"
+
+namespace WebKit {
+
+struct WebFontRenderStyle;
+
+// Put methods here that are required due to sandbox restrictions.
+class WebSandboxSupport {
+public:
+ // Fonts ---------------------------------------------------------------
+
+ // Get a font family which contains glyphs for the given Unicode
+ // code-points.
+ // characters: a UTF-16 encoded string
+ // numCharacters: the number of 16-bit words in |characters|
+ //
+ // Returns a string with the font family on an empty string if the
+ // request cannot be satisfied.
+ virtual WebString getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters) = 0;
+ virtual void getRenderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* style) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/linux/WebThemeEngine.h b/Source/WebKit/chromium/public/linux/WebThemeEngine.h
new file mode 100644
index 0000000..a98f224
--- /dev/null
+++ b/Source/WebKit/chromium/public/linux/WebThemeEngine.h
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2010 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 WebThemeEngine_h
+#define WebThemeEngine_h
+
+#include "../WebCanvas.h"
+#include "../WebColor.h"
+#include "../WebSize.h"
+
+namespace WebKit {
+
+struct WebRect;
+
+class WebThemeEngine {
+public:
+ // The UI part which is being accessed.
+ enum Part {
+ // ScrollbarTheme parts
+ PartScrollbarDownArrow,
+ PartScrollbarLeftArrow,
+ PartScrollbarRightArrow,
+ PartScrollbarUpArrow,
+ PartScrollbarHorizontalThumb,
+ PartScrollbarVerticalThumb,
+ PartScrollbarHorizontalTrack,
+ PartScrollbarVerticalTrack,
+
+ // RenderTheme parts
+ PartCheckbox,
+ PartRadio,
+ PartButton,
+ PartTextField,
+ PartMenuList,
+ PartSliderTrack,
+ PartSliderThumb,
+ PartInnerSpinButton,
+ PartProgressBar
+ };
+
+ // The current state of the associated Part.
+ enum State {
+ StateDisabled,
+ StateHover,
+ StateNormal,
+ StatePressed,
+ };
+
+ // Extra parameters for drawing the PartScrollbarHorizontalTrack and
+ // PartScrollbarVerticalTrack.
+ struct ScrollbarTrackExtraParams {
+ // The bounds of the entire track, as opposed to the part being painted.
+ int trackX;
+ int trackY;
+ int trackWidth;
+ int trackHeight;
+ };
+
+ // Extra parameters for PartCheckbox, PartPushButton and PartRadio.
+ struct ButtonExtraParams {
+ bool checked;
+ bool indeterminate; // Whether the button state is indeterminate.
+ bool isDefault; // Whether the button is default button.
+ WebColor backgroundColor;
+ };
+
+ // Extra parameters for PartTextField
+ struct TextFieldExtraParams {
+ bool isTextArea;
+ bool isListbox;
+ WebColor backgroundColor;
+ };
+
+ // Extra parameters for PartMenuList
+ struct MenuListExtraParams {
+ int arrowX;
+ int arrowY;
+ WebColor backgroundColor;
+ };
+
+ // Extra parameters for PartSliderTrack and PartSliderThumb
+ struct SliderExtraParams {
+ bool vertical;
+ bool inDrag;
+ };
+
+ // Extra parameters for PartInnerSpinButton
+ struct InnerSpinButtonExtraParams {
+ bool spinUp;
+ bool readOnly;
+ };
+
+ // Extra parameters for PartProgressBar
+ struct ProgressBarExtraParams {
+ bool determinate;
+ int valueRectX;
+ int valueRectY;
+ int valueRectWidth;
+ int valueRectHeight;
+ };
+
+ union ExtraParams {
+ ScrollbarTrackExtraParams scrollbarTrack;
+ ButtonExtraParams button;
+ TextFieldExtraParams textField;
+ MenuListExtraParams menuList;
+ SliderExtraParams slider;
+ InnerSpinButtonExtraParams innerSpin;
+ ProgressBarExtraParams progressBar;
+ };
+
+ // Gets the size of the given theme part. For variable sized items
+ // like vertical scrollbar thumbs, the width will be the required width of
+ // the track while the height will be the minimum height.
+ virtual WebSize getSize(Part) { return WebSize(); }
+ // Paint the given the given theme part.
+ virtual void paint(
+ WebCanvas*, Part, State, const WebRect&, const ExtraParams*) {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/mac/WebInputEventFactory.h b/Source/WebKit/chromium/public/mac/WebInputEventFactory.h
new file mode 100644
index 0000000..cbf213c
--- /dev/null
+++ b/Source/WebKit/chromium/public/mac/WebInputEventFactory.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 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 WebInputEventFactory_h
+#define WebInputEventFactory_h
+
+#include "../WebCommon.h"
+
+#ifdef __OBJC__
+@class NSEvent;
+@class NSView;
+#else
+class NSEvent;
+class NSView;
+#endif
+
+namespace WebKit {
+
+class WebKeyboardEvent;
+class WebMouseEvent;
+class WebMouseWheelEvent;
+
+class WebInputEventFactory {
+public:
+ WEBKIT_API static WebKeyboardEvent keyboardEvent(NSEvent*);
+ WEBKIT_API static WebKeyboardEvent keyboardEvent(wchar_t character, int modifiers, double timeStampSeconds);
+ WEBKIT_API static WebMouseEvent mouseEvent(NSEvent*, NSView*);
+ WEBKIT_API static WebMouseWheelEvent mouseWheelEvent(NSEvent*, NSView*);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/mac/WebSandboxSupport.h b/Source/WebKit/chromium/public/mac/WebSandboxSupport.h
new file mode 100644
index 0000000..57d48aa
--- /dev/null
+++ b/Source/WebKit/chromium/public/mac/WebSandboxSupport.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 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 WebSandboxSupport_h
+#define WebSandboxSupport_h
+
+typedef uintptr_t ATSFontContainerRef;
+
+#ifdef __OBJC__
+@class NSFont;
+#else
+class NSFont;
+#endif
+
+namespace WebKit {
+
+// Put methods here that are required due to sandbox restrictions.
+class WebSandboxSupport {
+public:
+ // Given an input font - |srcFont| [which can't be loaded due to sandbox
+ // restrictions]. Return a font container belonging to an equivalent
+ // font file that can be used to access the font.
+ //
+ // Note that a font container may contain multiple fonts, the caller is
+ // responsible for retreiving the appropriate font from the container.
+ //
+ // If this function succeeds, the caller assumes ownership of the |out|
+ // parameter and must call ATSFontDeactivate() to unload it when done.
+ //
+ // Returns: true on success, false on error.
+ virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef* out) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h b/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h
new file mode 100644
index 0000000..485e77f
--- /dev/null
+++ b/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2009 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 WebScreenInfoFactory_h
+#define WebScreenInfoFactory_h
+
+#include "../WebCommon.h"
+
+#ifdef __OBJC__
+@class NSView;
+#else
+class NSView;
+#endif
+
+namespace WebKit {
+
+struct WebScreenInfo;
+
+class WebScreenInfoFactory {
+public:
+ WEBKIT_API static WebScreenInfo screenInfo(NSView*);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/mac/WebThemeEngine.h b/Source/WebKit/chromium/public/mac/WebThemeEngine.h
new file mode 100644
index 0000000..8938816
--- /dev/null
+++ b/Source/WebKit/chromium/public/mac/WebThemeEngine.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010 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 WebThemeEngine_h
+#define WebThemeEngine_h
+
+#include "../WebCanvas.h"
+
+namespace WebKit {
+
+struct WebRect;
+
+class WebThemeEngine {
+public:
+ enum State {
+ StateDisabled,
+ StateInactive,
+ StateActive,
+ StatePressed,
+ };
+
+ enum Size {
+ SizeRegular,
+ SizeSmall,
+ };
+
+ enum ScrollbarOrientation {
+ ScrollbarOrientationHorizontal,
+ ScrollbarOrientationVertical,
+ };
+
+ enum ScrollbarParent {
+ ScrollbarParentScrollView,
+ ScrollbarParentRenderLayer,
+ };
+
+ struct ScrollbarInfo {
+ ScrollbarOrientation orientation;
+ ScrollbarParent parent;
+ int maxValue;
+ int currentValue;
+ int visibleSize;
+ int totalSize;
+ };
+
+ virtual void paintScrollbarThumb(WebCanvas*, State, Size, const WebRect&, const ScrollbarInfo&) {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/win/WebInputEventFactory.h b/Source/WebKit/chromium/public/win/WebInputEventFactory.h
new file mode 100644
index 0000000..ae02464
--- /dev/null
+++ b/Source/WebKit/chromium/public/win/WebInputEventFactory.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2009 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 WebInputEventFactory_h
+#define WebInputEventFactory_h
+
+#include "../WebCommon.h"
+
+#include <windows.h>
+
+namespace WebKit {
+
+class WebKeyboardEvent;
+class WebMouseEvent;
+class WebMouseWheelEvent;
+
+class WebInputEventFactory {
+public:
+ WEBKIT_API static WebKeyboardEvent keyboardEvent(HWND, UINT, WPARAM, LPARAM);
+ WEBKIT_API static WebMouseEvent mouseEvent(HWND, UINT, WPARAM, LPARAM);
+ WEBKIT_API static WebMouseWheelEvent mouseWheelEvent(HWND, UINT, WPARAM, LPARAM);
+
+ // Windows only provides information on whether a click was a single or
+ // double click, while we need to know the click count past two. The
+ // WebInputEventFactory keeps internal state to allow it to synthesize
+ // that information. In some cases, like fast-running tests, that
+ // information is known to be stale and needs to be reset; that is the
+ // function of resetLastClickState().
+ WEBKIT_API static void resetLastClickState();
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/win/WebSandboxSupport.h b/Source/WebKit/chromium/public/win/WebSandboxSupport.h
new file mode 100644
index 0000000..88d5362
--- /dev/null
+++ b/Source/WebKit/chromium/public/win/WebSandboxSupport.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 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 WebSandboxSupport_h
+#define WebSandboxSupport_h
+
+typedef struct HFONT__* HFONT;
+
+namespace WebKit {
+
+// Put methods here that are required due to sandbox restrictions.
+class WebSandboxSupport {
+public:
+ // Sometimes a Win32 API call will fail because a font is not loaded,
+ // and due to sandbox restrictions, the current process may be unable
+ // to access the filesystem to load the font. So, this call serves as
+ // a failover to ask the embedder to try some other way to load the
+ // font (usually by delegating to an empowered process to have it load
+ // the font). Returns true if the font was successfully loaded.
+ virtual bool ensureFontLoaded(HFONT) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h b/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h
new file mode 100644
index 0000000..a7040ea
--- /dev/null
+++ b/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2009 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 WebScreenInfoFactory_h
+#define WebScreenInfoFactory_h
+
+#include "../WebCommon.h"
+
+typedef struct HWND__* HWND;
+
+namespace WebKit {
+
+struct WebScreenInfo;
+
+class WebScreenInfoFactory {
+public:
+ WEBKIT_API static WebScreenInfo screenInfo(HWND);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/win/WebThemeEngine.h b/Source/WebKit/chromium/public/win/WebThemeEngine.h
new file mode 100644
index 0000000..1890db6
--- /dev/null
+++ b/Source/WebKit/chromium/public/win/WebThemeEngine.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2010 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 WebThemeEngine_h
+#define WebThemeEngine_h
+
+#include "../WebCanvas.h"
+#include "../WebColor.h"
+#include "../WebSize.h"
+
+namespace WebKit {
+
+struct WebRect;
+struct WebSize;
+
+class WebThemeEngine {
+public:
+// The part and state parameters correspond to values defined by the
+// Windows Theme API (see
+// http://msdn.microsoft.com/en-us/library/bb773187(VS.85).aspx ).
+// The classicState parameter corresponds to the uState
+// parameter of the Windows DrawFrameControl() function.
+// See the definitions in <vsstyle.h> and <winuser.h>.
+ virtual void paintButton(
+ WebCanvas*, int part, int state, int classicState,
+ const WebRect&) = 0;
+
+ virtual void paintMenuList(
+ WebCanvas*, int part, int state, int classicState,
+ const WebRect&) = 0;
+
+ virtual void paintScrollbarArrow(
+ WebCanvas*, int state, int classicState,
+ const WebRect&) = 0;
+
+ virtual void paintScrollbarThumb(
+ WebCanvas*, int part, int state, int classicState,
+ const WebRect&) = 0;
+
+ virtual void paintScrollbarTrack(
+ WebCanvas*, int part, int state, int classicState,
+ const WebRect&, const WebRect& alignRect) = 0;
+
+ virtual void paintSpinButton(
+ WebCanvas*, int part, int state, int classicState,
+ const WebRect&) {}
+
+ virtual void paintTextField(
+ WebCanvas*, int part, int state, int classicState,
+ const WebRect&, WebColor, bool fillContentArea, bool drawEdges) = 0;
+
+ virtual void paintTrackbar(
+ WebCanvas*, int part, int state, int classicState,
+ const WebRect&) = 0;
+
+ virtual void paintProgressBar(
+ WebCanvas*, const WebRect& barRect, const WebRect& valueRect,
+ bool determinate, double animatedSeconds) {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h b/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h
new file mode 100644
index 0000000..5e30da8
--- /dev/null
+++ b/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2009 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 WebScreenInfoFactory_h
+#define WebScreenInfoFactory_h
+
+#include "../WebCommon.h"
+
+typedef struct _XDisplay Display;
+
+namespace WebKit {
+
+struct WebScreenInfo;
+
+class WebScreenInfoFactory {
+public:
+ WEBKIT_API static WebScreenInfo screenInfo(Display*, int screenNumber);
+};
+
+} // namespace WebKit
+
+#endif