diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/api/public/WebFrame.h | 7 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.cc | 6 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.h | 8 | ||||
-rw-r--r-- | webkit/glue/webframeloaderclient_impl.cc | 9 | ||||
-rw-r--r-- | webkit/glue/webview_delegate.h | 4 |
5 files changed, 12 insertions, 22 deletions
diff --git a/webkit/api/public/WebFrame.h b/webkit/api/public/WebFrame.h index 6cde878..50b50b3 100644 --- a/webkit/api/public/WebFrame.h +++ b/webkit/api/public/WebFrame.h @@ -408,13 +408,6 @@ namespace WebKit { // about the new count. virtual void increaseMatchCount(int count, int identifier) = 0; - // Notifies the WebViewClient about a new selection rect. This will - // result in the browser getting notified. For more information see - // WebViewClient. - virtual void reportFindInPageSelection(const WebRect& selectionRect, - int activeMatchOrdinal, - 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; diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc index d9a7ced..b0a7f08 100644 --- a/webkit/glue/webframe_impl.cc +++ b/webkit/glue/webframe_impl.cc @@ -1182,7 +1182,7 @@ bool WebFrameImpl::find(int request_id, rect.y -= frameview()->scrollOffset().height(); *selection_rect = rect; - reportFindInPageSelection(rect, + ReportFindInPageSelection(rect, active_match_index_ + 1, request_id); } @@ -1340,7 +1340,7 @@ void WebFrameImpl::scopeStringMatches(int request_id, // Notify browser of new location for the selected rectangle. result_bounds.move(-frameview()->scrollOffset().width(), -frameview()->scrollOffset().height()); - reportFindInPageSelection( + ReportFindInPageSelection( webkit_glue::IntRectToWebRect( frame()->view()->convertToContainingWindow(result_bounds)), active_match_index_ + 1, @@ -1419,7 +1419,7 @@ void WebFrameImpl::increaseMatchCount(int count, int request_id) { frames_scoping_count_ == 0); } -void WebFrameImpl::reportFindInPageSelection(const WebRect& selection_rect, +void WebFrameImpl::ReportFindInPageSelection(const WebRect& selection_rect, int active_match_ordinal, int request_id) { // Update the UI with the latest selection rect. diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index 0633214..1b5c410 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -163,9 +163,6 @@ class WebFrameImpl : public WebKit::WebFrame, const WebKit::WebFindOptions& options, bool reset); virtual void cancelPendingScopingEffort(); virtual void increaseMatchCount(int count, int identifier); - virtual void reportFindInPageSelection( - const WebKit::WebRect& selection_rect, int active_match_ordinal, - int identifier); virtual void resetMatchCount(); virtual WebKit::WebURL completeURL(const WebKit::WebString& url) const; virtual WebKit::WebString contentAsText(size_t max_chars) const; @@ -327,6 +324,11 @@ class WebFrameImpl : public WebKit::WebFrame, INVALIDATE_ALL = 3 // both content area and the scrollbar. }; + // Notifies the delegate about a new selection rect. + void ReportFindInPageSelection( + const WebKit::WebRect& selection_rect, int active_match_ordinal, + int identifier); + // Invalidates a certain area within the frame. void InvalidateArea(AreaToInvalidate area); diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc index 355e301..a098f10 100644 --- a/webkit/glue/webframeloaderclient_impl.cc +++ b/webkit/glue/webframeloaderclient_impl.cc @@ -915,11 +915,10 @@ void WebFrameLoaderClient::setMainFrameDocumentReady(bool ready) { // Creates a new connection and begins downloading from that (contrast this // with |download|). void WebFrameLoaderClient::startDownload(const ResourceRequest& request) { - WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); - if (d) { - const GURL url(webkit_glue::KURLToGURL(request.url())); - const GURL referrer(webkit_glue::StringToStdString(request.httpReferrer())); - d->DownloadUrl(url, referrer); + if (webframe_->client()) { + WrappedResourceRequest webreq(request); + webframe_->client()->loadURLExternally( + webframe_, webreq, WebKit::WebNavigationPolicyDownload); } } diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h index a32b479..f45843b 100644 --- a/webkit/glue/webview_delegate.h +++ b/webkit/glue/webview_delegate.h @@ -352,10 +352,6 @@ class WebViewDelegate : virtual public WebKit::WebWidgetClient { const std::wstring& tooltip_text, WebKit::WebTextDirection text_direction_hint) { } - // Downloading ------------------------------------------------------------- - - virtual void DownloadUrl(const GURL& url, const GURL& referrer) { } - // InspectorClient --------------------------------------------------------- virtual void UpdateInspectorSettings(const std::wstring& raw_settings) { } |