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

japhet at chromium.org japhet at chromium.org
Wed Apr 7 23:27:42 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit ac41426272f9cae25cd08779badd594abddd4b9f
Author: japhet at chromium.org <japhet at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 22:08:48 2009 +0000

    2009-11-09  Nate Chapin  <japhet at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            Upstream Chromium API headers Webkit.h thru WebMediaPlayerClient.h.
    
            https://bugs.webkit.org/show_bug.cgi?id=28394
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50690 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index ba52e43..e52ee9b 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -2,6 +2,29 @@
 
         Reviewed by Dimitri Glazkov.
 
+        Upstream Chromium API headers Webkit.h thru WebMediaPlayerClient.h.
+
+        https://bugs.webkit.org/show_bug.cgi?id=28394
+
+        * public/WebKit.h: Added.
+        * public/WebKitClient.h: Added.
+        (WebKit::WebKitClient::~WebKitClient):
+        * public/WebLocalizedString.h: Added.
+        (WebKit::WebLocalizedString::):
+        * public/WebMediaPlayer.h: Added.
+        (WebKit::WebTimeRange::WebTimeRange):
+        (WebKit::WebMediaPlayer::):
+        (WebKit::WebMediaPlayer::~WebMediaPlayer):
+        * public/WebMediaPlayerAction.h: Added.
+        (WebKit::WebMediaPlayerAction::):
+        (WebKit::WebMediaPlayerAction::WebMediaPlayerAction):
+        * public/WebMediaPlayerClient.h: Added.
+        (WebKit::WebMediaPlayerClient::~WebMediaPlayerClient):
+
+2009-11-09  Nate Chapin  <japhet at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
         Upstream rest of WebH*.h and WebI*.h Chromium API headers.
 
         https://bugs.webkit.org/show_bug.cgi?id=28394
diff --git a/WebKit/chromium/public/WebKit.h b/WebKit/chromium/public/WebKit.h
new file mode 100644
index 0000000..b9e6407
--- /dev/null
+++ b/WebKit/chromium/public/WebKit.h
@@ -0,0 +1,64 @@
+/*
+ * 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();
+
+// 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/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
new file mode 100644
index 0000000..6ff6aa6
--- /dev/null
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -0,0 +1,272 @@
+/*
+ * 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 WebKitClient_h
+#define WebKitClient_h
+
+#include "WebCommon.h"
+#include "WebLocalizedString.h"
+#include "WebVector.h"
+
+#include <time.h>
+
+#ifdef WIN32
+typedef void *HANDLE;
+#endif
+
+namespace WebKit {
+
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
+class WebClipboard;
+class WebData;
+class WebMessagePortChannel;
+class WebMimeRegistry;
+class WebPluginListBuilder;
+class WebSandboxSupport;
+class WebSharedWorkerRepository;
+class WebSocketStreamHandle;
+class WebStorageNamespace;
+class WebString;
+class WebThemeEngine;
+class WebURL;
+class WebURLLoader;
+struct WebCookie;
+struct WebPluginInfo;
+template <typename T> class WebVector;
+
+class WebKitClient {
+public:
+    // Must return non-null.
+    virtual WebClipboard* clipboard() = 0;
+
+    // Must return non-null.
+    virtual WebMimeRegistry* mimeRegistry() = 0;
+
+    // May return null if sandbox support is not necessary
+    virtual WebSandboxSupport* sandboxSupport() = 0;
+
+    // May return null on some platforms.
+    virtual WebThemeEngine* themeEngine() = 0;
+
+
+    // Application Cache --------------------------------------------
+
+    // May return null if the process type doesn't involve appcaching.
+    virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) = 0;
+
+
+    // DOM Storage --------------------------------------------------
+
+    // Return a LocalStorage namespace that corresponds to the following path.
+    virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) = 0;
+
+    // Return a new SessionStorage namespace.
+    virtual WebStorageNamespace* createSessionStorageNamespace() = 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) = 0;
+
+
+    // File ----------------------------------------------------------------
+
+    // Various file/directory related functions.  These map 1:1 with
+    // functions in WebCore's FileSystem.h.
+    virtual bool fileExists(const WebString& path) = 0;
+    virtual bool deleteFile(const WebString& path) = 0;
+    virtual bool deleteEmptyDirectory(const WebString& path) = 0;
+    virtual bool getFileSize(const WebString& path, long long& result) = 0;
+    virtual bool getFileModificationTime(const WebString& path, time_t& result) = 0;
+    virtual WebString directoryName(const WebString& path) = 0;
+    virtual WebString pathByAppendingComponent(const WebString& path, const WebString& component) = 0;
+    virtual bool makeAllDirectories(const WebString& path) = 0;
+    virtual WebString getAbsolutePath(const WebString& path) = 0;
+    virtual bool isDirectory(const WebString& path) = 0;
+    virtual WebURL filePathToURL(const WebString& path) = 0;
+
+
+    // 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) = 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) = 0;
+
+
+    // 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& fileName, int desiredFlags, FileHandle* dirHandle) = 0;
+
+    // Deletes a database file and returns the error code
+    virtual int databaseDeleteFile(const WebString& fileName, bool syncDir) = 0;
+
+    // Returns the attributes of the given database file
+    virtual long databaseGetFileAttributes(const WebString& fileName) = 0;
+
+    // Returns the size of the given database file
+    virtual long long databaseGetFileSize(const WebString& fileName) = 0;
+
+
+    // 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) = 0;
+
+
+
+    // 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() = 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() = 0;
+
+
+    // Network -------------------------------------------------------------
+
+    virtual void setCookies(
+        const WebURL& url, const WebURL& policyURL, const WebString& cookies) = 0;
+    virtual WebString cookies(const WebURL& url, const WebURL& policyURL) = 0;
+    virtual bool rawCookies(const WebURL& url, const WebURL& policyURL, WebVector<WebCookie>*) = 0;
+    virtual void deleteCookie(const WebURL& url, const WebString& cookieName) = 0;
+
+    // A suggestion to prefetch IP information for the given hostname.
+    virtual void prefetchHostName(const WebString&) = 0;
+
+    // Returns a new WebURLLoader instance.
+    virtual WebURLLoader* createURLLoader() = 0;
+
+    // Returns a new WebSocketStreamHandle instance.
+    virtual WebSocketStreamHandle* createSocketStreamHandle() = 0;
+
+    // Returns the User-Agent string that should be used for the given URL.
+    virtual WebString userAgent(const WebURL&) = 0;
+
+
+    // Plugins -------------------------------------------------------------
+
+    // If refresh is true, then cached information should not be used to
+    // satisfy this call.
+    virtual void getPluginList(bool refresh, WebPluginListBuilder*) = 0;
+
+
+    // Profiling -----------------------------------------------------------
+
+    virtual void decrementStatsCounter(const char* name) = 0;
+    virtual void incrementStatsCounter(const char* name) = 0;
+
+    // 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) = 0;
+    virtual void traceEventEnd(const char* name, void* id, const char* extra) = 0;
+
+
+    // Resources -----------------------------------------------------------
+
+    // Returns a blob of data corresponding to the named resource.
+    virtual WebData loadResource(const char* name) = 0;
+
+    // Returns a localized string resource (with an optional numeric
+    // parameter value).
+    virtual WebString queryLocalizedString(WebLocalizedString::Name) = 0;
+    virtual WebString queryLocalizedString(WebLocalizedString::Name, int numericValue) = 0;
+
+
+    // 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() = 0;
+
+
+    // Shared Workers ------------------------------------------------------
+
+    virtual WebSharedWorkerRepository* sharedWorkerRepository() = 0;
+
+    // Sudden Termination --------------------------------------------------
+
+    // Disable/Enable sudden termination.
+    virtual void suddenTerminationChanged(bool enabled) = 0;
+
+
+    // System --------------------------------------------------------------
+
+    // Returns a value such as "en-US".
+    virtual WebString defaultLocale() = 0;
+
+    // Wall clock time in seconds since the epoch.
+    virtual double currentTime() = 0;
+
+    // Delayed work is driven by a shared timer.
+    virtual void setSharedTimerFiredFunction(void (*func)()) = 0;
+    virtual void setSharedTimerFireTime(double fireTime) = 0;
+    virtual void stopSharedTimer() = 0;
+
+    // Callable from a background WebKit thread.
+    virtual void callOnMainThread(void (*func)()) = 0;
+
+protected:
+    ~WebKitClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebLocalizedString.h b/WebKit/chromium/public/WebLocalizedString.h
new file mode 100644
index 0000000..99a7d23
--- /dev/null
+++ b/WebKit/chromium/public/WebLocalizedString.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 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,
+    };
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebMediaPlayer.h b/WebKit/chromium/public/WebMediaPlayer.h
new file mode 100644
index 0000000..0b658f9
--- /dev/null
+++ b/WebKit/chromium/public/WebMediaPlayer.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 WebMediaPlayer_h
+#define WebMediaPlayer_h
+
+#include "WebCanvas.h"
+#include "WebVector.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() const = 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;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebMediaPlayerAction.h b/WebKit/chromium/public/WebMediaPlayerAction.h
new file mode 100644
index 0000000..3aede25
--- /dev/null
+++ b/WebKit/chromium/public/WebMediaPlayerAction.h
@@ -0,0 +1,55 @@
+/*
+ * 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
+    };
+
+    Type type;
+    bool enable;
+
+    WebMediaPlayerAction()
+        : type(Unknown), enable(false) { }
+    WebMediaPlayerAction(Type type, bool enable)
+        : type(type), enable(enable) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebMediaPlayerClient.h b/WebKit/chromium/public/WebMediaPlayerClient.h
new file mode 100644
index 0000000..558fb4a
--- /dev/null
+++ b/WebKit/chromium/public/WebMediaPlayerClient.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 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() = 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;
+
+protected:
+    ~WebMediaPlayerClient() { }
+};
+
+} // namespace WebKit
+
+#endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list