diff options
author | Steve Block <steveblock@google.com> | 2010-07-08 12:51:48 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-07-09 15:33:40 +0100 |
commit | ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24 (patch) | |
tree | bb45155550ec013adc0ad10f4d7d354c6469b022 /WebKit/chromium/public | |
parent | d4b24d9a829ed7de70381c8b99fb75a07ab40466 (diff) | |
download | external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.zip external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.tar.gz external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.tar.bz2 |
Merge WebKit at r62496: Initial merge by git
Change-Id: Ie3da0770eca22a70a632e3571f31cfabc80facb2
Diffstat (limited to 'WebKit/chromium/public')
23 files changed, 153 insertions, 169 deletions
diff --git a/WebKit/chromium/public/WebAccessibilityCache.h b/WebKit/chromium/public/WebAccessibilityCache.h index 94704a0..52e438c 100644 --- a/WebKit/chromium/public/WebAccessibilityCache.h +++ b/WebKit/chromium/public/WebAccessibilityCache.h @@ -43,8 +43,8 @@ public: WebAccessibilityCache() {} virtual ~WebAccessibilityCache() {} - static WebAccessibilityCache* create(); - static void enableAccessibility(); + WEBKIT_API static WebAccessibilityCache* create(); + WEBKIT_API static void enableAccessibility(); virtual void initialize(WebView* view) = 0; virtual bool isInitialized() const = 0; diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h index 191d40f..f1b2474 100644 --- a/WebKit/chromium/public/WebAccessibilityObject.h +++ b/WebKit/chromium/public/WebAccessibilityObject.h @@ -64,44 +64,44 @@ public: bool isNull() const { return !m_private; } - WebString accessibilityDescription() const; - WebString actionVerb() const; - bool canSetFocusAttribute() const; - bool canSetValueAttribute() const; - - unsigned childCount() const; - - WebAccessibilityObject childAt(unsigned) const; - WebAccessibilityObject firstChild() const; - WebAccessibilityObject focusedChild() const; - WebAccessibilityObject lastChild() const; - WebAccessibilityObject nextSibling() const; - WebAccessibilityObject parentObject() const; - WebAccessibilityObject previousSibling() const; - - bool isAnchor() const; - bool isChecked() const; - bool isFocused() const; - bool isEnabled() const; - bool isHovered() const; - bool isIndeterminate() const; - bool isMultiSelectable() const; - bool isOffScreen() const; - bool isPasswordField() const; - bool isPressed() const; - bool isReadOnly() const; - bool isVisited() const; - - WebRect boundingBoxRect() const; - WebString helpText() const; - int headingLevel() const; - WebAccessibilityObject hitTest(const WebPoint&) const; - WebString keyboardShortcut() const; - bool performDefaultAction() const; - WebAccessibilityRole roleValue() const; - void setFocused(bool) const; - WebString stringValue() const; - WebString title() const; + WEBKIT_API WebString accessibilityDescription() const; + WEBKIT_API WebString actionVerb() const; + WEBKIT_API bool canSetFocusAttribute() const; + WEBKIT_API bool canSetValueAttribute() 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 isAnchor() const; + WEBKIT_API bool isChecked() const; + WEBKIT_API bool isFocused() const; + WEBKIT_API bool isEnabled() const; + WEBKIT_API bool isHovered() const; + WEBKIT_API bool isIndeterminate() 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 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; #if WEBKIT_IMPLEMENTATION WebAccessibilityObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>&); diff --git a/WebKit/chromium/public/WebClipboard.h b/WebKit/chromium/public/WebClipboard.h index 68e22b5..6755d96 100644 --- a/WebKit/chromium/public/WebClipboard.h +++ b/WebKit/chromium/public/WebClipboard.h @@ -32,11 +32,13 @@ #define WebClipboard_h #include "WebCommon.h" +#include "WebString.h" +#include "WebVector.h" namespace WebKit { +class WebDragData; class WebImage; -class WebString; class WebURL; class WebClipboard { @@ -51,22 +53,35 @@ public: BufferStandard, // Used on platforms like the X Window System that treat selection // as a type of clipboard. - BufferSelection + BufferSelection, + // Read-only buffer corresponding to the current drag operation, if any. + BufferDrag, }; - virtual bool isFormatAvailable(Format, Buffer) = 0; + virtual bool isFormatAvailable(Format, Buffer) { return false; } - virtual WebString readPlainText(Buffer) = 0; - virtual WebString readHTML(Buffer, WebURL*) = 0; + virtual WebString readPlainText(Buffer) { return WebString(); } + virtual WebString readHTML(Buffer, WebURL*) { return WebString(); } - virtual void writePlainText(const WebString&) = 0; + virtual void writePlainText(const WebString&) { } virtual void writeHTML( const WebString& htmlText, const WebURL&, - const WebString& plainText, bool writeSmartPaste) = 0; + const WebString& plainText, bool writeSmartPaste) { } virtual void writeURL( - const WebURL&, const WebString& title) = 0; + const WebURL&, const WebString& title) { } virtual void writeImage( - const WebImage&, const WebURL&, const WebString& title) = 0; + const WebImage&, const WebURL&, const WebString& title) { } + virtual void writeData(const WebDragData&) { } + + // 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() {} diff --git a/WebKit/chromium/public/WebCompositionCommand.h b/WebKit/chromium/public/WebCompositionCommand.h deleted file mode 100644 index bda1eb1..0000000 --- a/WebKit/chromium/public/WebCompositionCommand.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 WebCompositionCommand_h -#define WebCompositionCommand_h - -namespace WebKit { - -// DEPRECATED. -enum WebCompositionCommand { - WebCompositionCommandDiscard, - WebCompositionCommandSet, - WebCompositionCommandConfirm, -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebContextMenuData.h b/WebKit/chromium/public/WebContextMenuData.h index 8ed1f1b..e3aee4e 100644 --- a/WebKit/chromium/public/WebContextMenuData.h +++ b/WebKit/chromium/public/WebContextMenuData.h @@ -124,6 +124,7 @@ struct WebContextMenuData { CanPaste = 0x10, CanDelete = 0x20, CanSelectAll = 0x40, + CanTranslate = 0x80, }; // Which edit operations are available in the context. diff --git a/WebKit/chromium/public/WebDatabase.h b/WebKit/chromium/public/WebDatabase.h index 4679f68..0a5d4f8 100644 --- a/WebKit/chromium/public/WebDatabase.h +++ b/WebKit/chromium/public/WebDatabase.h @@ -34,33 +34,15 @@ #include "WebCommon.h" #include "WebSecurityOrigin.h" -#if WEBKIT_IMPLEMENTATION namespace WebCore { class AbstractDatabase; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif namespace WebKit { class WebDatabaseObserver; -class WebDatabasePrivate; class WebString; class WebDatabase { public: - WebDatabase() : m_private(0) { } - WebDatabase(const WebDatabase& d) : m_private(0) { assign(d); } - ~WebDatabase() { reset(); } - - WebDatabase& operator=(const WebDatabase& d) - { - assign(d); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebDatabase&); - bool isNull() const { return !m_private; } - WEBKIT_API WebString name() const; WEBKIT_API WebString displayName() const; WEBKIT_API unsigned long estimatedSize() const; @@ -76,15 +58,12 @@ public: const WebString& originIdentifier, const WebString& databaseName); #if WEBKIT_IMPLEMENTATION - WebDatabase(const WTF::PassRefPtr<WebCore::AbstractDatabase>&); - WebDatabase& operator=(const WTF::PassRefPtr<WebCore::AbstractDatabase>&); - operator WTF::PassRefPtr<WebCore::AbstractDatabase>() const; + WebDatabase(const WebCore::AbstractDatabase*); #endif private: - void assign(WebDatabasePrivate*); - - WebDatabasePrivate* m_private; + WebDatabase() { } + const WebCore::AbstractDatabase* m_database; }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h index d1ad23c..3bdee3c 100644 --- a/WebKit/chromium/public/WebDevToolsAgent.h +++ b/WebKit/chromium/public/WebDevToolsAgent.h @@ -47,8 +47,6 @@ struct WebURLError; class WebDevToolsAgent { public: - WEBKIT_API static WebDevToolsAgent* create(WebView*, WebDevToolsAgentClient*); - virtual ~WebDevToolsAgent() {} virtual void attach() = 0; diff --git a/WebKit/chromium/public/WebEventListener.h b/WebKit/chromium/public/WebEventListener.h index 52de1cd..62ca0de 100644 --- a/WebKit/chromium/public/WebEventListener.h +++ b/WebKit/chromium/public/WebEventListener.h @@ -31,6 +31,8 @@ #ifndef WebEventListener_h #define WebEventListener_h +#include "WebCommon.h" + #if WEBKIT_IMPLEMENTATION namespace WebCore { class Node; } #endif @@ -45,8 +47,8 @@ class WebString; class WebEventListener { public: - WebEventListener(); - virtual ~WebEventListener(); + WEBKIT_API WebEventListener(); + WEBKIT_API virtual ~WebEventListener(); // Called when an event is received. virtual void handleEvent(const WebEvent&) = 0; diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h index 319ce38..c4fa7ae 100644 --- a/WebKit/chromium/public/WebFrame.h +++ b/WebKit/chromium/public/WebFrame.h @@ -408,12 +408,16 @@ public: // Returns true if page box (margin boxes and page borders) is visible. virtual bool isPageBoxVisible(int pageIndex) = 0; - // Returns the page area rectangle in pixels, assuming 96 pixels per inch. - virtual WebRect pageAreaRectInPixels(int pageIndex) = 0; - - // Returns the preferred page size in pixels, assuming 96 pixels per inch. - virtual WebSize preferredPageSizeInPixels(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 -------------------------------------------------------- @@ -484,6 +488,11 @@ public: 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 ------------------------------------------------------------- diff --git a/WebKit/chromium/public/WebGeolocationServiceMock.h b/WebKit/chromium/public/WebGeolocationServiceMock.h index d1a146b..407fe9d 100644 --- a/WebKit/chromium/public/WebGeolocationServiceMock.h +++ b/WebKit/chromium/public/WebGeolocationServiceMock.h @@ -31,6 +31,7 @@ #ifndef WebGeolocationServiceMock_h #define WebGeolocationServiceMock_h +#include "WebCommon.h" #include "WebGeolocationService.h" namespace WebKit { @@ -39,10 +40,10 @@ class WebString; class WebGeolocationServiceMock : public WebGeolocationService { public: - static WebGeolocationServiceMock* createWebGeolocationServiceMock(); - static void setMockGeolocationPermission(bool allowed); - static void setMockGeolocationPosition(double latitude, double longitude, double accuracy); - static void setMockGeolocationError(int errorCode, const WebString& message); + WEBKIT_API static WebGeolocationServiceMock* createWebGeolocationServiceMock(); + WEBKIT_API static void setMockGeolocationPermission(bool allowed); + WEBKIT_API static void setMockGeolocationPosition(double latitude, double longitude, double accuracy); + WEBKIT_API static void setMockGeolocationError(int errorCode, const WebString& message); protected: static bool s_mockGeolocationPermission; diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h index dc4f534..4378afb 100644 --- a/WebKit/chromium/public/WebGraphicsContext3D.h +++ b/WebKit/chromium/public/WebGraphicsContext3D.h @@ -40,6 +40,8 @@ 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 @@ -77,11 +79,11 @@ public: // Creates a "default" implementation of WebGraphicsContext3D which calls // OpenGL directly. - static WebGraphicsContext3D* createDefault(); + WEBKIT_API static WebGraphicsContext3D* createDefault(); // Initializes the graphics context; should be the first operation performed // on newly-constructed instances. Returns true on success. - virtual bool initialize(Attributes) = 0; + virtual bool initialize(Attributes, WebView*) = 0; // Makes the OpenGL context current on the current thread. Returns true on // success. @@ -108,6 +110,15 @@ public: // 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 @@ -169,6 +180,8 @@ public: 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; diff --git a/WebKit/chromium/public/WebIDBDatabaseError.h b/WebKit/chromium/public/WebIDBDatabaseError.h index f56a0d0..255d175 100644 --- a/WebKit/chromium/public/WebIDBDatabaseError.h +++ b/WebKit/chromium/public/WebIDBDatabaseError.h @@ -40,11 +40,11 @@ namespace WebKit { // See comment in WebIndexedDatabase for a high level overview these classes. class WebIDBDatabaseError { public: - ~WebIDBDatabaseError(); + WEBKIT_API ~WebIDBDatabaseError(); - WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); } - WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); } - WebIDBDatabaseError& operator=(const WebIDBDatabaseError& e) + WEBKIT_API WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); } + WEBKIT_API WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); } + WEBKIT_API WebIDBDatabaseError& operator=(const WebIDBDatabaseError& e) { assign(e); return *this; diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h index d1da883..48765ac 100644 --- a/WebKit/chromium/public/WebKitClient.h +++ b/WebKit/chromium/public/WebKitClient.h @@ -83,7 +83,6 @@ public: // May return null. virtual WebCookieJar* cookieJar() { return 0; } - // DOM Storage -------------------------------------------------- // Return a LocalStorage namespace that corresponds to the following path. diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h index 787d4f3..f872111 100644 --- a/WebKit/chromium/public/WebNotification.h +++ b/WebKit/chromium/public/WebNotification.h @@ -64,7 +64,7 @@ public: // Operators required to put WebNotification in an ordered map. bool equals(const WebNotification& other) const { return m_private == other.m_private; } - bool lessThan(const WebNotification& other) const; + WEBKIT_API bool lessThan(const WebNotification& other) const; // Is the notification HTML vs. icon-title-text? WEBKIT_API bool isHTML() const; diff --git a/WebKit/chromium/public/WebPasswordFormData.h b/WebKit/chromium/public/WebPasswordFormData.h index e1804d1..30ce5ca 100644 --- a/WebKit/chromium/public/WebPasswordFormData.h +++ b/WebKit/chromium/public/WebPasswordFormData.h @@ -40,7 +40,7 @@ namespace WebKit { struct WebPasswordFormData { // If the provided form is suitable for password completion, isValid() will // return true; - WebPasswordFormData(const WebFormElement&); + WEBKIT_API WebPasswordFormData(const WebFormElement&); // If creation failed, return false. bool isValid() const { return action.isValid(); } diff --git a/WebKit/chromium/public/WebPlugin.h b/WebKit/chromium/public/WebPlugin.h index f57c621..57f1cba 100644 --- a/WebKit/chromium/public/WebPlugin.h +++ b/WebKit/chromium/public/WebPlugin.h @@ -32,6 +32,7 @@ #define WebPlugin_h #include "WebCanvas.h" +#include "WebString.h" struct NPObject; @@ -93,6 +94,8 @@ public: // Ends the print operation. virtual void printEnd() { } + virtual WebString selectedText() { return WebString(); } + protected: ~WebPlugin() { } }; diff --git a/WebKit/chromium/public/WebPluginContainer.h b/WebKit/chromium/public/WebPluginContainer.h index 7b23f08..66ef9ab 100644 --- a/WebKit/chromium/public/WebPluginContainer.h +++ b/WebKit/chromium/public/WebPluginContainer.h @@ -36,6 +36,7 @@ struct NPObject; namespace WebKit { class WebElement; +class WebPlugin; class WebString; class WebURL; class WebURLRequest; @@ -77,6 +78,9 @@ public: virtual void loadFrameRequest( const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData) = 0; + virtual WebPlugin* plugin() = 0; + virtual void setPlugin(WebPlugin*) = 0; + protected: ~WebPluginContainer() { } }; diff --git a/WebKit/chromium/public/WebSearchableFormData.h b/WebKit/chromium/public/WebSearchableFormData.h index e453387..5cd1d9b 100644 --- a/WebKit/chromium/public/WebSearchableFormData.h +++ b/WebKit/chromium/public/WebSearchableFormData.h @@ -43,7 +43,7 @@ class WebSearchableFormData { public: // If the provided form is suitable for automated searching, isValid() // will return false. - WebSearchableFormData(const WebFormElement&); + WEBKIT_API WebSearchableFormData(const WebFormElement&); bool isValid() { return m_url.isValid(); } diff --git a/WebKit/chromium/public/WebStorageEventDispatcher.h b/WebKit/chromium/public/WebStorageEventDispatcher.h index 57750e8..37ceb7c 100644 --- a/WebKit/chromium/public/WebStorageEventDispatcher.h +++ b/WebKit/chromium/public/WebStorageEventDispatcher.h @@ -41,7 +41,7 @@ class WebURL; // FIXME: Make this (or something) work for SessionStorage! class WebStorageEventDispatcher { public: - static WebStorageEventDispatcher* create(); + WEBKIT_API static WebStorageEventDispatcher* create(); virtual ~WebStorageEventDispatcher() { } diff --git a/WebKit/chromium/public/WebString.h b/WebKit/chromium/public/WebString.h index d2cf9ea..2c9664e 100644 --- a/WebKit/chromium/public/WebString.h +++ b/WebKit/chromium/public/WebString.h @@ -131,7 +131,7 @@ public: WebString(const NullableString16& s) : m_private(0) { if (s.is_null()) - assign(0); + reset(); else assign(s.string().data(), s.string().length()); } @@ -139,7 +139,7 @@ public: WebString& operator=(const NullableString16& s) { if (s.is_null()) - assign(0); + reset(); else assign(s.string().data(), s.string().length()); return *this; diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h index eadfc26..1efd752 100644 --- a/WebKit/chromium/public/WebView.h +++ b/WebKit/chromium/public/WebView.h @@ -32,6 +32,8 @@ #define WebView_h #include "WebDragOperation.h" +#include "WebString.h" +#include "WebVector.h" #include "WebWidget.h" namespace WebKit { @@ -42,13 +44,13 @@ class WebDevToolsAgentClient; class WebDragData; class WebFrame; class WebFrameClient; +class WebGLES2Context; class WebNode; class WebSettings; class WebString; class WebViewClient; struct WebMediaPlayerAction; struct WebPoint; -template <typename T> class WebVector; class WebView : public WebWidget { public: @@ -57,7 +59,7 @@ public: // Creates a WebView that is NOT yet initialized. You will need to // call initializeMainFrame to finish the initialization. It is valid // to pass null WebViewClient and WebDevToolsAgentClient pointers. - WEBKIT_API static WebView* create(WebViewClient*, WebDevToolsAgentClient* = 0); + WEBKIT_API static WebView* create(WebViewClient*, WebDevToolsAgentClient*); // After creating a WebView, you should immediately call this method. // You can optionally modify the settings before calling this method. @@ -224,7 +226,6 @@ public: // The embedder may optionally engage a WebDevToolsAgent. This may only // be set once per WebView. virtual WebDevToolsAgent* devToolsAgent() = 0; - virtual void setDevToolsAgent(WebDevToolsAgent*) = 0; // Accessibility ------------------------------------------------------- @@ -233,17 +234,18 @@ public: virtual WebAccessibilityObject accessibilityObject() = 0; - // AutoFill / Autocomplete --------------------------------------------- + // AutoFill ----------------------------------------------------------- // Notifies the WebView that AutoFill suggestions are available for a node. virtual void applyAutoFillSuggestions( const WebNode&, const WebVector<WebString>& names, const WebVector<WebString>& labels, - int defaultSuggestionIndex) = 0; + int separatorIndex) = 0; // Notifies the WebView that Autocomplete suggestions are available for a // node. + // DEPRECATED: merging with applyAutoFillSuggestions. virtual void applyAutocompleteSuggestions( const WebNode&, const WebVector<WebString>& suggestions, @@ -281,10 +283,22 @@ public: unsigned inactiveForegroundColor) = 0; // User scripts -------------------------------------------------------- - virtual void addUserScript(const WebString& sourceCode, - bool runAtStart) = 0; - virtual void addUserStyleSheet(const WebString& sourceCode) = 0; - virtual void removeAllUserContent() = 0; + // FIXME: These two methods are DEPRECATED. Remove once Chromium has been rolled. + virtual void addUserScript(const WebString& sourceCode, bool runAtStart) + { + addUserScript(sourceCode, WebVector<WebString>(), runAtStart); + } + virtual void addUserStyleSheet(const WebString& sourceCode) + { + addUserStyleSheet(sourceCode, WebVector<WebString>()); + } + + WEBKIT_API static void addUserScript(const WebString& sourceCode, + const WebVector<WebString>& patterns, + bool runAtStart); + WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode, + const WebVector<WebString>& patterns); + WEBKIT_API static void removeAllUserContent(); // Modal dialog support ------------------------------------------------ @@ -293,6 +307,12 @@ public: WEBKIT_API static void willEnterModalLoop(); WEBKIT_API static void didExitModalLoop(); + // GPU acceleration support -------------------------------------------- + + // Returns the GLES2Context associated with this WebView. One will be + // created if it doesn't already exist. + virtual WebGLES2Context* gles2Context() = 0; + protected: ~WebView() {} }; diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h index 0712815..a59289d 100644 --- a/WebKit/chromium/public/WebViewClient.h +++ b/WebKit/chromium/public/WebViewClient.h @@ -126,9 +126,6 @@ public: virtual bool isSmartInsertDeleteEnabled() { return true; } virtual bool isSelectTrailingWhitespaceEnabled() { return true; } - // DEPRECATED: replaced by WebWidgetClient::resetInputMethod(). - virtual void setInputMethodEnabled(bool enabled) { } - virtual void didBeginEditing() { } virtual void didChangeSelection(bool isSelectionEmpty) { } virtual void didChangeContents() { } diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h index 3da245b..5c9f54e 100644 --- a/WebKit/chromium/public/WebWidget.h +++ b/WebKit/chromium/public/WebWidget.h @@ -33,7 +33,6 @@ #include "WebCanvas.h" #include "WebCommon.h" -#include "WebCompositionCommand.h" #include "WebCompositionUnderline.h" #include "WebTextInputType.h" #include "WebTextDirection.h" @@ -79,13 +78,6 @@ public: // Called to inform the WebWidget that it has gained or lost keyboard focus. virtual void setFocus(bool) = 0; - // DEPRECATED. It's replaced by setComposition() and confirmComposition(). - virtual bool handleCompositionEvent(WebCompositionCommand command, - int cursorPosition, - int targetStart, - int targetEnd, - const WebString& text) = 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 @@ -101,10 +93,6 @@ public: // Returns true if there is an ongoing composition. virtual bool confirmComposition() = 0; - // DEPRECATED. It's replaced by textInputType() and - // caretOrSelectionBounds(). - virtual bool queryCompositionStatus(bool* enabled, WebRect* caretBounds) = 0; - // Returns the current text input type of this WebWidget. virtual WebTextInputType textInputType() = 0; |