diff options
Diffstat (limited to 'WebKit/chromium/src/WebFrameImpl.h')
-rw-r--r-- | WebKit/chromium/src/WebFrameImpl.h | 63 |
1 files changed, 48 insertions, 15 deletions
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h index ccba6d4..52d9db4 100644 --- a/WebKit/chromium/src/WebFrameImpl.h +++ b/WebKit/chromium/src/WebFrameImpl.h @@ -31,17 +31,17 @@ #ifndef WebFrameImpl_h #define WebFrameImpl_h -// FIXME: remove this relative path once consumers from glue are removed. -#include "../public/WebFrame.h" +#include "WebAnimationControllerImpl.h" +#include "WebFrame.h" + #include "Frame.h" #include "FrameLoaderClientImpl.h" #include "PlatformString.h" #include <wtf/OwnPtr.h> #include <wtf/RefCounted.h> -#include "WebAnimationControllerImpl.h" - namespace WebCore { +class GraphicsContext; class HistoryItem; class KURL; class Node; @@ -56,6 +56,8 @@ class WebDataSourceImpl; class WebInputElement; class WebFrameClient; class WebPasswordAutocompleteListener; +class WebPerformance; +class WebPluginContainerImpl; class WebView; class WebViewImpl; @@ -64,7 +66,8 @@ class WebFrameImpl : public WebFrame, public RefCounted<WebFrameImpl> { public: // WebFrame methods: virtual WebString name() const; - virtual void clearName(); + virtual void setName(const WebString&); + virtual long long identifier() const; virtual WebURL url() const; virtual WebURL favIconURL() const; virtual WebURL openSearchDescriptionURL() const; @@ -88,7 +91,8 @@ public: virtual WebFrame* findChildByExpression(const WebString&) const; virtual WebDocument document() const; virtual void forms(WebVector<WebFormElement>&) const; - virtual WebAnimationController* animationController(); + virtual WebAnimationController* animationController(); + virtual WebPerformance performance() const; virtual WebSecurityOrigin securityOrigin() const; virtual void grantUniversalAccess(); virtual NPObject* windowObject() const; @@ -100,10 +104,12 @@ public: virtual void addMessageToConsole(const WebConsoleMessage&); virtual void collectGarbage(); #if WEBKIT_USING_V8 + virtual v8::Handle<v8::Value> executeScriptAndReturnValue( + const WebScriptSource&); virtual v8::Local<v8::Context> mainWorldScriptContext() const; #endif virtual bool insertStyleText(const WebString& css, const WebString& id); - virtual void reload(); + virtual void reload(bool ignoreCache); virtual void loadRequest(const WebURLRequest&); virtual void loadHistoryItem(const WebHistoryItem&); virtual void loadData( @@ -122,6 +128,7 @@ public: virtual bool isViewSourceModeEnabled() const; virtual void setReferrerForRequest(WebURLRequest&, const WebURL& referrer); virtual void dispatchWillSendRequest(WebURLRequest&); + virtual WebURLLoader* createAssociatedURLLoader(); virtual void commitDocumentData(const char* data, size_t length); virtual unsigned unloadListenerCount() const; virtual bool isProcessingUserGesture() const; @@ -132,6 +139,7 @@ public: virtual void unmarkText(); virtual bool hasMarkedText() const; virtual WebRange markedRange() const; + virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const; virtual bool executeCommand(const WebString&); virtual bool executeCommand(const WebString&, const WebString& value); virtual bool isCommandEnabled(const WebString&) const; @@ -142,10 +150,18 @@ public: virtual WebString selectionAsText() const; virtual WebString selectionAsMarkup() const; virtual bool selectWordAroundCaret(); - virtual int printBegin(const WebSize& pageSize); + virtual int printBegin(const WebSize& pageSize, int printerDPI, + bool* useBrowserOverlays); virtual float printPage(int pageToPrint, WebCanvas*); virtual float getPrintPageShrink(int page); virtual void printEnd(); + virtual bool isPageBoxVisible(int pageIndex); + virtual void pageSizeAndMarginsInPixels(int pageIndex, + WebSize& pageSize, + int& marginTop, + int& marginRight, + int& marginBottom, + int& marginLeft); virtual bool find( int identifier, const WebString& searchText, const WebFindOptions&, bool wrapWithinFrame, WebRect* selectionRect); @@ -156,17 +172,26 @@ public: virtual void cancelPendingScopingEffort(); virtual void increaseMatchCount(int count, int identifier); virtual void resetMatchCount(); - virtual void registerPasswordListener( + virtual bool registerPasswordListener( WebInputElement, WebPasswordAutocompleteListener*); + virtual void notifiyPasswordListenerOfAutocomplete( + const WebInputElement&); - virtual WebURL completeURL(const WebString& url) const; virtual WebString contentAsText(size_t maxChars) const; virtual WebString contentAsMarkup() const; virtual WebString renderTreeAsText() const; virtual WebString counterValueForElementById(const WebString& id) const; + virtual WebString markerTextForListItem(const WebElement&) const; virtual int pageNumberForElementById(const WebString& id, float pageWidthInPixels, float pageHeightInPixels) const; + virtual WebRect selectionBoundsRect() const; + + virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const; + virtual bool pauseSVGAnimation(const WebString& animationId, + double time, + const WebString& elementId); + virtual WebString layerTreeAsText() const; static PassRefPtr<WebFrameImpl> create(WebFrameClient* client); ~WebFrameImpl(); @@ -179,11 +204,16 @@ public: void layout(); void paint(WebCanvas*, const WebRect&); + void paintWithContext(WebCore::GraphicsContext&, const WebRect&); void createFrameView(); static WebFrameImpl* fromFrame(WebCore::Frame* frame); static WebFrameImpl* fromFrameOwnerElement(WebCore::Element* element); + // If the frame hosts a PluginDocument, this method returns the WebPluginContainerImpl + // that hosts the plugin. + static WebPluginContainerImpl* pluginContainerFromFrame(WebCore::Frame*); + WebViewImpl* viewImpl() const; WebCore::Frame* frame() const { return m_frame; } @@ -212,16 +242,16 @@ public: // Sets whether the WebFrameImpl allows its document to be scrolled. // If the parameter is true, allow the document to be scrolled. // Otherwise, disallow scrolling. - void setAllowsScrolling(bool); + void setCanHaveScrollbars(bool); // Returns the password autocomplete listener associated with the passed // user name input element, or 0 if none available. // Note that the returned listener is owner by the WebFrameImpl and should not // be kept around as it is deleted when the page goes away. - WebPasswordAutocompleteListener* getPasswordListener(WebCore::HTMLInputElement*); + WebPasswordAutocompleteListener* getPasswordListener(const WebCore::HTMLInputElement*); WebFrameClient* client() const { return m_client; } - void dropClient() { m_client = 0; } + void setClient(WebFrameClient* client) { m_client = client; } static void selectWordAroundPosition(WebCore::Frame*, WebCore::VisiblePosition); @@ -267,7 +297,7 @@ private: // It is not necessary if the frame is invisible, for example, or if this // is a repeat search that already returned nothing last time the same prefix // was searched. - bool shouldScopeMatches(const WebCore::String& searchText); + bool shouldScopeMatches(const WTF::String& searchText); // Queue up a deferred call to scopeStringMatches. void scopeStringMatchesSoon( @@ -318,7 +348,7 @@ private: // short-circuiting searches in the following scenarios: When a frame has // been searched and returned 0 results, we don't need to search that frame // again if the user is just adding to the search (making it more specific). - WebCore::String m_lastSearchString; + WTF::String m_lastSearchString; // Keeps track of how many matches this frame has found so far, so that we // don't loose count between scoping efforts, and is also used (in conjunction @@ -359,6 +389,9 @@ private: // Keeps a reference to the frame's WebAnimationController. WebAnimationControllerImpl m_animationController; + + // The identifier of this frame. + long long m_identifier; }; } // namespace WebKit |