Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1836973003: Move download messages from Renderer to Frame filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments, merge Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 3df57d69da47892f504e9dccc69b655c9b507006..063954d06e4d457b134f83a20174b006a84faf70 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -3624,42 +3624,6 @@ HitTestResult WebViewImpl::coreHitTestResultAt(const WebPoint& pointInViewport)
return hitTestResultForRootFramePos(pointInRootFrame);
}
-void WebViewImpl::copyImageAt(const WebPoint& point)
-{
- if (!m_page)
- return;
-
- HitTestResult result = hitTestResultForViewportPos(point);
- if (!isHTMLCanvasElement(result.innerNodeOrImageMapImage()) && result.absoluteImageURL().isEmpty()) {
- // There isn't actually an image at these coordinates. Might be because
- // the window scrolled while the context menu was open or because the page
- // changed itself between when we thought there was an image here and when
- // we actually tried to retreive the image.
- //
- // FIXME: implement a cache of the most recent HitTestResult to avoid having
- // to do two hit tests.
- return;
- }
-
- m_page->deprecatedLocalMainFrame()->editor().copyImage(result);
-}
-
-void WebViewImpl::saveImageAt(const WebPoint& point)
-{
- if (!m_client)
- return;
-
- Node* node = hitTestResultForViewportPos(point).innerNodeOrImageMapImage();
- if (!node || !(isHTMLCanvasElement(*node) || isHTMLImageElement(*node)))
- return;
-
- String url = toElement(*node).imageSourceURL();
- if (!KURL(KURL(), url).protocolIsData())
- return;
-
- m_client->saveImageFromDataURL(url);
-}
-
void WebViewImpl::dragSourceEndedAt(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698